]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/recoverpassword.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / actions / recoverpassword.php
index 1cbb73fd4a21fa5528fcabcaf6506dfb4848b083..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->getProfile());
-
-        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();