From c4cc85a8a4e2e72e63c93e7c4d1370e63f2b12b2 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 27 Jul 2009 15:18:47 +0200 Subject: [PATCH] MFB: Support password resetting. --- framework/Auth/lib/Horde/Auth/Composite.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/framework/Auth/lib/Horde/Auth/Composite.php b/framework/Auth/lib/Horde/Auth/Composite.php index a417d8ca7..e38bfb7b6 100644 --- a/framework/Auth/lib/Horde/Auth/Composite.php +++ b/framework/Auth/lib/Horde/Auth/Composite.php @@ -106,6 +106,21 @@ class Horde_Auth_Composite extends Horde_Auth_Base } /** + * Reset a user's password. Used for example when the user does not + * remember the existing password. + * + * @param string $userId The user id for which to reset the password. + * + * @return mixed The new password on success or a PEAR_Error object on + * failure. + */ + public function resetPassword($userId) + { + $driver = $this->_loadDriver('admin'); + $driver->resetPassword($userId); + } + + /** * Delete a set of authentication credentials. * * @param string $userId The userId to delete. -- 2.11.0