diff options
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r-- | engine/lib/users.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index 62f2bdcc8..9ed3d0863 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -889,19 +889,17 @@ function send_new_password_request($user_guid) { function force_user_password_reset($user_guid, $password) { global $CONFIG; - if (call_gatekeeper('execute_new_password_request', __FILE__)) { - $user = get_entity($user_guid); + $user = get_entity($user_guid); - if ($user) { - $salt = generate_random_cleartext_password(); // Reset the salt - $user->salt = $salt; + if ($user) { + $salt = generate_random_cleartext_password(); // Reset the salt + $user->salt = $salt; - $hash = generate_user_password($user, $password); + $hash = generate_user_password($user, $password); - $query = "UPDATE {$CONFIG->dbprefix}users_entity - set password='$hash', salt='$salt' where guid=$user_guid"; - return update_data($query); - } + $query = "UPDATE {$CONFIG->dbprefix}users_entity + set password='$hash', salt='$salt' where guid=$user_guid"; + return update_data($query); } return false; |