1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Prevent duplicate confirmation emails

This commit is contained in:
Hillel Coren 2018-03-18 18:05:36 +02:00
parent cd5b084187
commit 4f45fe7995
2 changed files with 3 additions and 3 deletions

View File

@ -1380,7 +1380,7 @@ class AccountController extends BaseController
$user->username = $user->email;
$user->password = bcrypt($password);
$user->registered = true;
$newUser->acceptLatestTerms($ip);
$user->acceptLatestTerms($ip);
$user->save();
$user->account->startTrial(PLAN_PRO);

View File

@ -44,10 +44,10 @@ class HandleUserSettingsChanged
$users = $this->accountRepo->loadAccounts(Auth::user()->id);
Session::put(SESSION_USER_ACCOUNTS, $users);
if ($event->user && $event->user->isEmailBeingChanged()) {
if ($event->user && $event->user->confirmed && $event->user->isEmailBeingChanged()) {
$this->userMailer->sendConfirmation($event->user);
$this->userMailer->sendEmailChanged($event->user);
Session::flash('warning', trans('texts.verify_email'));
}
}