From 47ae21c08e3fa49a0f7049a399a7d5d335cd77f3 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 6 Mar 2016 16:45:29 +0100 Subject: [PATCH] Don't resend confirm_address if profile is silenced --- scripts/resend_confirm_address.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/resend_confirm_address.php b/scripts/resend_confirm_address.php index 1d7cb55ca5..1e5bcc1555 100755 --- a/scripts/resend_confirm_address.php +++ b/scripts/resend_confirm_address.php @@ -64,6 +64,11 @@ function mailConfirmAddress(Confirm_address $ca) { try { $user = User::getByID($ca->user_id); + $profile = $user->getProfile(); + if ($profile->isSilenced()) { + $ca->delete(); + return; + } if ($user->email === $ca->address) { throw new AlreadyFulfilledException('User already has identical confirmed email address.'); } -- 2.39.5