From fb5c773965810c339bfdeabb704903b88026bca0 Mon Sep 17 00:00:00 2001 From: donal72 Date: Sun, 28 Jan 2007 22:08:59 +0000 Subject: [PATCH] Auth: Documentation update to reflect changes in signature of user_update_password method --- auth/README | 6 ++++-- auth/db/auth.php | 7 +++++++ auth/email/auth.php | 6 +++--- auth/ldap/auth.php | 3 +-- auth/manual/auth.php | 6 +++--- auth/none/auth.php | 6 +++--- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/auth/README b/auth/README index 3caa42f3b0..72944542ee 100644 --- a/auth/README +++ b/auth/README @@ -177,8 +177,10 @@ change_password_url() Returns the URL for changing the users' passwords, or false if the default URL can be used. -user_update_password($username, $newpassword) - Updates the user's password. +user_update_password($user, $newpassword) + Updates the user's password. In previous versions of Moodle, the function + auth_user_update_password accepted a username as the first parameter. The + revised function expects a user object. config_form() Displays the configuration form for the auth plugin, for use in the admin diff --git a/auth/db/auth.php b/auth/db/auth.php index 1bd81d96fe..47ee43febb 100644 --- a/auth/db/auth.php +++ b/auth/db/auth.php @@ -153,6 +153,13 @@ class auth_plugin_db { } + /** + * Change a user's password + * + * @param object $user The user to update + * @param string $newpassword The new password + * @return bool True on success + */ function user_update_password($user, $newpassword) { global $CFG; diff --git a/auth/email/auth.php b/auth/email/auth.php index f91eb35ad5..78d3882d9d 100644 --- a/auth/email/auth.php +++ b/auth/email/auth.php @@ -58,13 +58,13 @@ class auth_plugin_email { return false; } - /* + /** * Updates the user's password. * * called when the user password is updated. * - * @param mixed $username Username - * @param mixed $newpassword Plaintext password + * @param object $user User + * @param string $newpassword Plaintext password * @return boolean result * */ diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index f2f7e9c791..4587d88409 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -954,7 +954,7 @@ class auth_plugin_ldap { } - /* + /** * changes userpassword in external db * * called when the user password is updated. @@ -962,7 +962,6 @@ class auth_plugin_ldap { * * @param object $user User table object * @param mixed $newpassword Plaintext password - * @param mixed $oldpassword Plaintext old password to bind ldap with * @return boolean result * */ diff --git a/auth/manual/auth.php b/auth/manual/auth.php index 25b862392b..82dcd0f66b 100644 --- a/auth/manual/auth.php +++ b/auth/manual/auth.php @@ -50,13 +50,13 @@ class auth_plugin_manual return false; } - /* + /** * Updates the user's password. * * called when the user password is updated. * - * @param mixed $username Username - * @param mixed $newpassword Plaintext password + * @param object $user User + * @param string $newpassword Plaintext password * @return boolean result * */ diff --git a/auth/none/auth.php b/auth/none/auth.php index b41fea5e90..00d7976a72 100644 --- a/auth/none/auth.php +++ b/auth/none/auth.php @@ -51,13 +51,13 @@ class auth_plugin_none { return false; } - /* + /** * Updates the user's password. * * called when the user password is updated. * - * @param mixed $username Username - * @param mixed $newpassword Plaintext password + * @param object $user User + * @param string $newpassword Plaintext password * @return boolean result * */ -- 2.39.5