RecoverpasswordAction uses User->setPassword()

This commit is contained in:
Mikael Nordfeldth 2015-12-30 17:53:43 +01:00
parent 29847f172f
commit b0bf620c61

View File

@ -322,16 +322,7 @@ class RecoverpasswordAction extends Action
} }
// OK, we're ready to go // OK, we're ready to go
$user->setPassword($newpassword);
$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.'));
}
$this->clearTempUser(); $this->clearTempUser();