MFB: Support password resetting.
authorJan Schneider <jan@horde.org>
Mon, 27 Jul 2009 13:18:47 +0000 (15:18 +0200)
committerJan Schneider <jan@horde.org>
Tue, 28 Jul 2009 20:14:37 +0000 (22:14 +0200)
framework/Auth/lib/Horde/Auth/Composite.php

index a417d8c..e38bfb7 100644 (file)
@@ -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.