diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-11-27 12:01:36 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-07-08 01:57:59 +0200 |
commit | bcce2625a8cb0b630d945c6849014049869e10ce (patch) | |
tree | 2031911a85a7a6a85015ff77ca8f9b326fa1da8e /includes/pages/user_settings.php | |
parent | fd4303f336173101b84ba21650e451ad536828fe (diff) |
Implemented AuthController for login
* Moved /login functionality to AuthController
* Refactored password handling logic to use the Authenticator
Diffstat (limited to 'includes/pages/user_settings.php')
-rw-r--r-- | includes/pages/user_settings.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php index ae29e4d8..f6853191 100644 --- a/includes/pages/user_settings.php +++ b/includes/pages/user_settings.php @@ -101,9 +101,10 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes) function user_settings_password($user_source) { $request = request(); + $auth = auth(); if ( !$request->has('password') - || !verify_password($request->postData('password'), $user_source->password, $user_source->id) + || !$auth->verifyPassword($user_source, $request->postData('password')) ) { error(__('-> not OK. Please try again.')); } elseif (strlen($request->postData('new_password')) < config('min_password_length')) { @@ -111,7 +112,7 @@ function user_settings_password($user_source) } elseif ($request->postData('new_password') != $request->postData('new_password2')) { error(__('Your passwords don\'t match.')); } else { - set_password($user_source->id, $request->postData('new_password')); + $auth->setPassword($user_source, $request->postData('new_password')); success(__('Password saved.')); } redirect(page_link_to('user_settings')); |