- A user being disabled usually means that his email is
not yet verified by proper double opt-in.
- A banned user has no means of changing his notification
settings.
In both cases emails may have increased odds of being
moved into the Junk folder by the recipient and as a
consequence hurting the reputation of the sending mail
server.
see
0290c038a0f12431d0adeaf803cdd44d06fc086f
if (!isset($users[$userID])) continue;
$user = $users[$userID];
+ // no notifications for disabled or banned users
+ if ($user->activationCode) continue;
+ if ($user->banned) continue;
+
// add mail header
$message = $user->getLanguage()->getDynamicVariable('wcf.user.notification.mail.header', array(
'user' => $user
* @param \wcf\system\user\notification\event\IUserNotificationEvent $event
*/
public function sendInstantMailNotification(UserNotification $notification, User $user, IUserNotificationEvent $event) {
+ // no notifications for disabled or banned users
+ if ($user->activationCode) return;
+ if ($user->banned) return;
+
// recipient's language
$event->setLanguage($user->getLanguage());