From f09f10753f5fb54a432c6924d2cadd2307c9d03e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 23 May 2019 21:17:47 +0300 Subject: [PATCH] Fix duplicate confirmation emails --- app/Listeners/HandleUserSettingsChanged.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Listeners/HandleUserSettingsChanged.php b/app/Listeners/HandleUserSettingsChanged.php index 5a0dfb5b62..c70275713d 100644 --- a/app/Listeners/HandleUserSettingsChanged.php +++ b/app/Listeners/HandleUserSettingsChanged.php @@ -44,7 +44,7 @@ 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);