Skip to content

Commit 09d99b9

Browse files
committed
[FIX] Skip newsletter to empty email accounts
1 parent 4a7153b commit 09d99b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pages/admin/newsletter.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
$iSuccess = 0;
2121
foreach ($user->getAllAssoc() as $aData) {
2222
$aUserNotificationSettings = $notification->getNotificationSettings($aData['id']);
23-
if ($aData['is_locked'] != 0 || $aUserNotificationSettings['newsletter'] != 1) continue;
23+
if ($aData['is_locked'] != 0 || $aUserNotificationSettings['newsletter'] != 1 || empty($aData['email']) continue;
2424
$aData['subject'] = $_REQUEST['data']['subject'];
2525
$aData['CONTENT'] = $_REQUEST['data']['content'];
2626
if (!$mail->sendMail('newsletter/body', $aData, true)) {

0 commit comments

Comments
 (0)