From 0290c038a0f12431d0adeaf803cdd44d06fc086f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 14 Jul 2014 23:59:27 +0200 Subject: [PATCH] MailWorker ignores banned and not activated users --- .../install/files/lib/system/worker/MailWorker.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/worker/MailWorker.class.php b/wcfsetup/install/files/lib/system/worker/MailWorker.class.php index 4ed62cb348..1d7e5564d6 100644 --- a/wcfsetup/install/files/lib/system/worker/MailWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/MailWorker.class.php @@ -62,8 +62,13 @@ class MailWorker extends AbstractWorker { if ($this->mailData['action'] == '') { $this->conditions->add("user.userID IN (?)", array($this->mailData['userIDs'])); } - else if ($this->mailData['action'] == 'group') { - $this->conditions->add("user.userID IN (SELECT userID FROM wcf".WCF_N."_user_to_group WHERE groupID IN (?))", array($this->mailData['groupIDs'])); + else { + $this->conditions->add("user.activationCode = ?", array(0)); + $this->conditions->add("user.banned = ?", array(0)); + + if ($this->mailData['action'] == 'group') { + $this->conditions->add("user.userID IN (SELECT userID FROM wcf".WCF_N."_user_to_group WHERE groupID IN (?))", array($this->mailData['groupIDs'])); + } } $sql = "SELECT COUNT(*) AS count -- 2.20.1