From f2ac90d450c5b6888bf6323466b2dc9c3275f4bd Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 14 Jan 2009 10:31:47 +0000 Subject: Closes #675: Posted missing commits from last time. git-svn-id: https://code.elgg.org/elgg/trunk@2567 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/user/password.php | 1 + engine/lib/users.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/actions/user/password.php b/actions/user/password.php index aae22cc02..eb5debcb8 100644 --- a/actions/user/password.php +++ b/actions/user/password.php @@ -31,6 +31,7 @@ { if ($password == $password2) { + $user->salt = generate_random_cleartext_password(); // Reset the salt $user->password = generate_user_password($user, $password); if ($user->save()) system_message(elgg_echo('user:password:success')); diff --git a/engine/lib/users.php b/engine/lib/users.php index 5d5153cc4..3de4044ae 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -390,7 +390,7 @@ // Exists and you have access to it if ($exists = get_data_row("SELECT guid from {$CONFIG->dbprefix}users_entity where guid = {$guid}")) { - $result = update_data("UPDATE {$CONFIG->dbprefix}users_entity set name='$name', username='$username', password='$password', email='$email', language='$language', code='$code', last_action = ". time() ." where guid = {$guid}"); + $result = update_data("UPDATE {$CONFIG->dbprefix}users_entity set name='$name', username='$username', password='$password', salt='$salt', email='$email', language='$language', code='$code', last_action = ". time() ." where guid = {$guid}"); if ($result != false) { // Update succeeded, continue -- cgit v1.2.3