]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/recoverpassword.php
Managed_DataObject->updateWithKeys throws its own exception
[quix0rs-gnu-social.git] / actions / recoverpassword.php
index 46df772b73214047dcd05351e5cda52ef216e6ae..4839a036c0e4be2dcb0f632f3d3fd32c71204336 100644 (file)
@@ -105,12 +105,8 @@ class RecoverpasswordAction extends Action
         if (!$user->email) {
             $orig = clone($user);
             $user->email = $email;
-            $result = $user->updateWithKeys($orig);
-            if (!$result) {
-                common_log_db_error($user, 'UPDATE', __FILE__);
-                // TRANS: Server error displayed when updating a user's e-mail address in the database fails while recovering a password.
-                $this->serverError(_('Could not update user with confirmed email address.'));
-            }
+            // Throws exception on failure.
+            $user->updateWithKeys($orig);
         }
 
         // Success!