]> git.mjollnir.org Git - moodle.git/commitdiff
auth/db: When using internal passwords we must register auth_update_user_password()
authormartinlanghoff <martinlanghoff>
Tue, 18 Jul 2006 01:36:47 +0000 (01:36 +0000)
committermartinlanghoff <martinlanghoff>
Tue, 18 Jul 2006 01:36:47 +0000 (01:36 +0000)
Now users can update their password correctly. We did have this before, I
wonder if it got dropped in a merge.

auth/db/lib.php

index 9cc1228c3f4c6cd498d724c1ace71f4cd6c17e31..838d2647ca70b0ee10d5b8fe03ab247544af0b6a 100644 (file)
@@ -118,6 +118,16 @@ function auth_get_userinfo($username){
 }
 
 
+function auth_user_update_password($username, $newpassword) {
+    global $CFG;
+    if ($CFG->auth_dbpasstype === 'internal') {
+        return set_field('user', 'password', md5($newpassword), 'username', $username);
+    } else {
+        // we should have never been called!
+        return false;
+    }
+}
+
 /**
  * syncronizes user fron external db to moodle user table
  *