Move mail_confirm_address out of mail.php

This commit is contained in:
Mikael Nordfeldth
2016-03-06 17:27:40 +01:00
parent 47ae21c08e
commit 6ec72b2978
7 changed files with 94 additions and 60 deletions

View File

@@ -384,8 +384,7 @@ class User extends Managed_DataObject
if (!empty($email) && empty($user->email)) {
try {
require_once(INSTALLDIR . '/lib/mail.php');
mail_confirm_address($user, $confirm->code, $profile->getNickname(), $email);
$confirm->sendConfirmation();
} catch (EmailException $e) {
common_log(LOG_ERR, "Could not send user registration email for user id=={$profile->getID()}: {$e->getMessage()}");
if (!$accept_email_fail) {