]> git.mxchange.org Git - friendica.git/commitdiff
Don't send item notifications to deleted user accounts
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 12 Nov 2022 14:59:20 +0000 (09:59 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 14 Nov 2022 22:02:42 +0000 (17:02 -0500)
src/Model/Post/UserNotification.php

index 108f3c44ffcecff806aeaccfcd63ae17ed54c5c7..66ec6ac907916c5811756a3c4e18708aab173a00 100644 (file)
@@ -178,11 +178,15 @@ class UserNotification
                        return;
                }
 
-               $user = User::getById($uid, ['account-type']);
+               $user = User::getById($uid, ['account-type', 'account_removed', 'account_expired']);
                if (in_array($user['account-type'], [User::ACCOUNT_TYPE_COMMUNITY, User::ACCOUNT_TYPE_RELAY])) {
                        return;
                }
 
+               if ($user['account_removed'] || $user['account_expired']) {
+                       return;
+               }
+
                $author = Contact::getById($item['author-id'], ['contact-type']);
                if (empty($author)) {
                        return;