From 3279a3554070ccd063d04c1e0d5d390e7c2c374d Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Tue, 18 Jul 2006 01:36:47 +0000 Subject: [PATCH] auth/db: When using internal passwords we must register auth_update_user_password() 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/auth/db/lib.php b/auth/db/lib.php index 9cc1228c3f4c6..838d2647ca70b 100644 --- a/auth/db/lib.php +++ b/auth/db/lib.php @@ -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 *