From: Hypolite Petovan Date: Sat, 12 Nov 2022 14:59:20 +0000 (-0500) Subject: Don't send item notifications to deleted user accounts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=48b1dceb19d4d1c2d5cdec3a36a93b3304ae8c6b;p=friendica.git Don't send item notifications to deleted user accounts --- diff --git a/src/Model/Post/UserNotification.php b/src/Model/Post/UserNotification.php index 108f3c44ff..66ec6ac907 100644 --- a/src/Model/Post/UserNotification.php +++ b/src/Model/Post/UserNotification.php @@ -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;