]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/emailsettings.php
change default timeout setting for HTTPClient
[quix0rs-gnu-social.git] / actions / emailsettings.php
index c02f1cdfad27b861739e5c47737097c115e9ad5a..b5933fdb6515c7db7444cfeeae281b572511e691 100644 (file)
@@ -369,8 +369,7 @@ class EmailsettingsAction extends SettingsAction
                 throw new ServerException(_('Could not insert confirmation code.'));
             }
 
-            common_debug('Sending confirmation address for user '.$user->getID().' to email '.$email);
-            mail_confirm_address($user, $confirm->code, $user->getNickname(), $email);
+            $confirm->sendConfirmation();
 
             Event::handle('EndAddEmailAddress', array($user, $email));
         }
@@ -401,13 +400,7 @@ class EmailsettingsAction extends SettingsAction
             throw new AlreadyFulfilledException(_('No pending confirmation to cancel.'));
         }
 
-        $result = $confirm->delete();
-
-        if ($result === false) {
-            common_log_db_error($confirm, 'DELETE', __FILE__);
-            // TRANS: Server error thrown on database error canceling e-mail address confirmation.
-            throw new ServerException(_('Could not delete email confirmation.'));
-        }
+        $confirm->delete();
 
         // TRANS: Message given after successfully canceling e-mail address confirmation.
         return _('Email confirmation cancelled.');