Skip to content

Commit ca51eab

Browse files
author
Thom Pol
committed
Fix checks to send email also if only reseller should receive it (#6346)
1 parent d685b85 commit ca51eab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/lib/classes/cron.d/300-quota_notify.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public function onRunJob() {
426426
if(!$rec['last_quota_notification']) $send_notification = true; // not yet notified
427427
elseif($mail_config['overquota_notify_freq'] > 0 && $rec['notified_before'] >= $mail_config['overquota_notify_freq']) $send_notification = true;
428428

429-
if(($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_client'] == 'y') && $send_notification == true) {
429+
if(($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_reseller'] == 'y' || $mail_config['overquota_notify_client'] == 'y') && $send_notification == true) {
430430
$app->dbmaster->datalogUpdate('mail_user', array("last_quota_notification" => date('Y-m-d')), 'mailuser_id', $rec['mailuser_id']);
431431

432432
$placeholders = array('{email}' => $rec['email'],
@@ -525,7 +525,7 @@ public function onRunJob() {
525525

526526

527527
//* Send quota notifications
528-
if(($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y') && $send_notification == true) {
528+
if(($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_reseller'] == 'y' || $web_config['overquota_db_notify_client'] == 'y') && $send_notification == true) {
529529
$app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => date('Y-m-d')), 'database_id', $rec['database_id']);
530530
$placeholders = array(
531531
'{database_name}' => $rec['database_name'],

0 commit comments

Comments
 (0)