Fix #3322: Disabled users still receive emails notifications

This commit is contained in:
Lucas Bartholemy 2018-10-11 12:02:04 +02:00
parent b045210f53
commit 8e6c50e10d
2 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,7 @@ HumHub Change Log
- Fix: Richtext loses mark state
- Fix: New comment scroll behavior not used in edit comment
- Chng: Updated `humhub-prosemirror-richtext` to v1.0.12
- Fix #3322: Disabled users still receive emails notifications
1.3.5 (October 10, 2018)

View File

@ -64,6 +64,7 @@ class NotificationManager
public function sendBulk(BaseNotification $notification, $userQuery)
{
$processed = [];
/** @var User $user */
foreach ($userQuery->each() as $user) {
if ($notification->suppressSendToOriginator && $notification->isOriginator($user)) {
@ -74,6 +75,10 @@ class NotificationManager
continue;
}
if ($user->status != User::STATUS_ENABLED) {
continue;
}
if ($notification->saveRecord($user)) {
foreach ($this->getTargets($user) as $target) {
$target->send($notification, $user);