Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated bugfix according to Jerome suggestions

password check is done at lib.php instead of externallib.php

Conflicts:

	user/lib.php
  • Loading branch information...
commit 9e63c0ff714eb56a40f0dbe094e352a48443f3ac 1 parent 5fc420e
@fabiomsouto fabiomsouto authored mouneyrac committed
Showing with 13 additions and 3 deletions.
  1. +13 −3 user/lib.php
View
16 user/lib.php
@@ -69,15 +69,25 @@ function user_update_user($user) {
if (!is_object($user)) {
$user = (object)$user;
}
-
- /// hash the password
- $user->password = hash_internal_user_password($user->password);
+
+ //MDL-30878
+ //unset password here, for updating later
+ if (isset($user->password)) {
+ $passwd = $user->password;
+ unset($user->password);
+ }
$user->timemodified = time();
$DB->update_record('user', $user);
/// trigger user_updated event on the full database user row
$updateduser = $DB->get_record('user', array('id' => $user->id));
+
+ //MDL-30878
+ //if password was set, then update its hash
+ if (isset($passwd))
+ update_internal_user_password($updateduser, $passwd);
+
events_trigger('user_updated', $updateduser);
}
Please sign in to comment.
Something went wrong with that request. Please try again.