]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/recoverpassword.php
Merged
[quix0rs-gnu-social.git] / actions / recoverpassword.php
index 060ba83510b44fb82fc870e7f7d7f74e49e6a5c3..14ed582db122f391aaaac0016a5c7e0c36c21498 100644 (file)
@@ -29,7 +29,7 @@ class RecoverpasswordAction extends Action
     var $msg = null;
     var $success = null;
 
-    function handle($args)
+    function handle(array $args=array())
     {
         parent::handle($args);
         if (common_logged_in()) {
@@ -322,16 +322,7 @@ class RecoverpasswordAction extends Action
         }
 
         // OK, we're ready to go
-
-        $original = clone($user);
-
-        $user->password = common_munge_password($newpassword, $user->id);
-
-        if (!$user->update($original)) {
-            common_log_db_error($user, 'UPDATE', __FILE__);
-            // TRANS: Reset password form validation error message.
-            $this->serverError(_('Cannot save new password.'));
-        }
+        $user->setPassword($newpassword);
 
         $this->clearTempUser();