]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/password.php
fix service discovery (I think)
[quix0rs-gnu-social.git] / actions / password.php
index 6eba136cebaaf60ca642e25a41bfc6c16e8fa026..8f770a969d57c75ff4220724dd63e6dfaa4c49c6 100644 (file)
@@ -64,6 +64,12 @@ class PasswordAction extends SettingsAction {
 
                $user->password = common_munge_password($newpassword, $user->id);
 
+               $val = $user->validate();
+               if ($val !== TRUE) {
+                       $this->show_form(_t('Error saving user; invalid.'));
+                       return;
+               }
+
                if (!$user->update($original)) {
                        common_server_error(_t('Can\'t save new password.'));
                        return;