diff options
| author | 2018-04-06 20:52:33 +0200 | |
|---|---|---|
| committer | 2018-04-06 20:52:33 +0200 | |
| commit | 6cda39a2f1fad096f850075564dd6e5790bf9925 (patch) | |
| tree | 65a223427386e7dedb621b5c60741c67c876c5be /app/Controllers/userController.php | |
| parent | 6b9be92263cd9034ae8a84e6032b555591c948a1 (diff) | |
fix update user for empty username (#1857)
Diffstat (limited to 'app/Controllers/userController.php')
| -rw-r--r-- | app/Controllers/userController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index 2dad6a3f0..4b47b365e 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -46,6 +46,10 @@ class FreshRSS_user_Controller extends Minz_ActionController { public static function updateUser($user, $passwordPlain, $apiPasswordPlain, $userConfigUpdated = array()) { $userConfig = get_user_configuration($user); + if ($userConfig === null) { + return false; + } + if ($passwordPlain != '') { $passwordHash = self::hashPassword($passwordPlain); $userConfig->passwordHash = $passwordHash; @@ -78,8 +82,8 @@ class FreshRSS_user_Controller extends Minz_ActionController { $username = Minz_Request::param('username'); $ok = self::updateUser($username, $passwordPlain, $apiPasswordPlain, array( - 'token' => Minz_Request::param('token', null), - )); + 'token' => Minz_Request::param('token', null), + )); if ($ok) { Minz_Request::good(_t('feedback.user.updated', $username), |
