]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't resend confirm_address if profile is silenced
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 6 Mar 2016 15:45:29 +0000 (16:45 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 6 Mar 2016 15:45:29 +0000 (16:45 +0100)
scripts/resend_confirm_address.php

index 1d7cb55ca5529f7330fcda554df453e5a8c7e966..1e5bcc1555434b92b5a2266375c877dad3430120 100755 (executable)
@@ -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.');
         }