Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-32572 fix notice when changing internal auth_db passwords

  • Loading branch information...
commit 9559ed75c3d23472201596541f2b0bfda7d15e3b 1 parent 8f93c40
@skodak skodak authored stronk7 committed
Showing with 9 additions and 1 deletion.
  1. +9 −1 auth/db/auth.php
View
10 auth/db/auth.php
@@ -191,8 +191,16 @@ function get_userinfo($username) {
* @return bool True on success
*/
function user_update_password($user, $newpassword) {
+ global $DB;
+
if ($this->is_internal()) {
- return update_internal_user_password($user, $newpassword);
+ $puser = $DB->get_record('user', array('id'=>$user->id), '*', MUST_EXIST);
+ if (update_internal_user_password($puser, $newpassword)) {
+ $user->password = $puser->password;
+ return true;
+ } else {
+ return false;
+ }
} else {
// we should have never been called!
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.