@@ 344-349 (lines=6) @@ | ||
341 | // bad password |
|
342 | $password = $f3->get('REQUEST.password'); |
|
343 | $confirm_password = $f3->get('REQUEST.confirm_password'); |
|
344 | if (empty($password) || empty($confirm_password) || ($password !== $confirm_password)) { |
|
345 | $this->notify(_('That password and confirm password must match!'), 'warning'); |
|
346 | $f3->set('form', $f3->get('REQUEST')); |
|
347 | echo \View::instance()->render($view); |
|
348 | return; |
|
349 | } |
|
350 | ||
351 | // use the model to validate the data input |
|
352 | $usersMapper->copyfrom($f3->get('REQUEST')); |
|
@@ 161-166 (lines=6) @@ | ||
158 | // check password is correct |
|
159 | $str = Helpers\Str::instance(); |
|
160 | $old_password = $f3->get('REQUEST.old_password'); |
|
161 | if (empty($old_password) || !$str->passwordVerify($usersMapper->password, $old_password)) { |
|
162 | $this->notify(_('You entered your current password incorrectly!'), 'warning'); |
|
163 | $f3->set('form', $f3->get('REQUEST')); |
|
164 | echo \View::instance()->render($view); |
|
165 | return; |
|
166 | } |
|
167 | ||
168 | // only allow updating of these fields |
|
169 | $data = $f3->get('REQUEST'); |