diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 08:36:32 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 08:36:32 +0000 |
commit | 863c7044a223d101b29e630d048d0f53580f4096 (patch) | |
tree | 80fe3ad2c7487bcaf62bd641118edd632ea5157d /engine/lib/users.php | |
parent | 9f41e8b1a34044d654ce3c6381efe3b3e2030c35 (diff) | |
download | elgg-863c7044a223d101b29e630d048d0f53580f4096.tar.gz elgg-863c7044a223d101b29e630d048d0f53580f4096.tar.bz2 |
Fixes #2468: Deprecated call_gatekeeper() and callpath_gatekeeper()
git-svn-id: http://code.elgg.org/elgg/trunk@7369 36083f99-b078-4883-b0ff-0f9b5a30f544
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; |