]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
RecoverpasswordAction uses User->setPassword()
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 30 Dec 2015 16:53:43 +0000 (17:53 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 30 Dec 2015 16:53:43 +0000 (17:53 +0100)
actions/recoverpassword.php

index 1cbb73fd4a21fa5528fcabcaf6506dfb4848b083..a3a5b8e5bc6ea41b4c52792296070f9e577b2c92 100644 (file)
@@ -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();