mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Supervisor added blacklist to avoid mail twice
Former-commit-id: e2f03306076d90f9abe312694ea1fa2298ee7c62
This commit is contained in:
parent
42b0afb884
commit
e90d4b7256
@ -356,6 +356,7 @@ class ConsoleSupervisor
|
|||||||
bool $update=false
|
bool $update=false
|
||||||
) {
|
) {
|
||||||
$notification_id = $notification['id_mensaje'];
|
$notification_id = $notification['id_mensaje'];
|
||||||
|
$blacklist = [];
|
||||||
|
|
||||||
if (is_array($this->targetUsers) === true
|
if (is_array($this->targetUsers) === true
|
||||||
&& count($this->targetUsers) > 0
|
&& count($this->targetUsers) > 0
|
||||||
@ -382,6 +383,7 @@ class ConsoleSupervisor
|
|||||||
io_safe_output($notification['subject']),
|
io_safe_output($notification['subject']),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
array_push($blacklist, $user['id_user']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -407,13 +409,14 @@ class ConsoleSupervisor
|
|||||||
if ($update === false) {
|
if ($update === false) {
|
||||||
// Send mail.
|
// Send mail.
|
||||||
if (isset($group['also_mail']) && $group['also_mail'] == 1) {
|
if (isset($group['also_mail']) && $group['also_mail'] == 1) {
|
||||||
$this->warn('Mailing group: '.$group['id_group']."\n");
|
|
||||||
enterprise_hook(
|
enterprise_hook(
|
||||||
'send_email_group',
|
'send_email_group',
|
||||||
[
|
[
|
||||||
$group['id_group'],
|
$group['id_group'],
|
||||||
io_safe_output($notification['mensaje']).'<br><hl><br>'.$notification['url'],
|
io_safe_output($notification['mensaje']).'<br><hl><br>'.$notification['url'],
|
||||||
io_safe_output($notification['subject']),
|
io_safe_output($notification['subject']),
|
||||||
|
null,
|
||||||
|
$blacklist,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user