aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notifications/method
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/notifications/method')
-rw-r--r--phpBB/includes/notifications/method/email.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/notifications/method/email.php b/phpBB/includes/notifications/method/email.php
index b1979296b9..2b80b5bf3a 100644
--- a/phpBB/includes/notifications/method/email.php
+++ b/phpBB/includes/notifications/method/email.php
@@ -52,6 +52,13 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
$user_ids[] = $notification->user_id;
}
+ // We do not send emails to banned users
+ if (!function_exists('phpbb_get_banned_user_ids'))
+ {
+ include($phpbb_container->getParameter('core.root_path') . 'includes/functions_user.' . $phpbb_container->getParameter('core.php_ext'));
+ }
+ $banned_users = phpbb_get_banned_user_ids($user_ids);
+
$sql = 'SELECT * FROM ' . USERS_TABLE . '
WHERE ' . $this->db->sql_in_set('user_id', $user_ids);
$result = $this->db->sql_query($sql);
@@ -72,6 +79,11 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
// Time to go through the queue and send emails
foreach ($this->queue as $notification)
{
+ if (in_array($notification->user_id, $banned_users))
+ {
+ continue;
+ }
+
$notification->users($users);
$user = $notification->get_user($notification->user_id);