X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpasswordsettings.php;h=da752cbb9174a2de439b7865cb926be7cc16834f;hb=4d17d9533552ea620b83109c550e250a5c236291;hp=cfdb6c78176e221fcef24a1cd3e7d04feb48584b;hpb=d4482757134f33b36de3003421853246ec04ed91;p=quix0rs-gnu-social.git diff --git a/actions/passwordsettings.php b/actions/passwordsettings.php index cfdb6c7817..da752cbb91 100644 --- a/actions/passwordsettings.php +++ b/actions/passwordsettings.php @@ -144,22 +144,8 @@ class PasswordsettingsAction extends SettingsAction if (Event::handle('StartChangePassword', array($this->scoped, $oldpassword, $newpassword))) { //no handler changed the password, so change the password internally - $user = $this->scoped->getUser(); - $original = clone($user); + $user->setPassword($newpassword); - $user->password = common_munge_password($newpassword, $this->scoped); - - $val = $user->validate(); - if ($val !== true) { - // TRANS: Form validation error on page where to change password. - throw new ServerException(_('Error saving user; invalid.')); - } - - if (!$user->update($original)) { - // TRANS: Server error displayed on page where to change password when password change - // TRANS: could not be made because of a server error. - throw new ServerException(_('Cannot save new password.')); - } Event::handle('EndChangePassword', array($this->scoped)); }