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:
parent
cd5b084187
commit
4f45fe7995
@ -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);
|
||||
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user