diff --git a/lib/cronjobs/send_mail_notifications.class.php b/lib/cronjobs/send_mail_notifications.class.php index 9529d0bc8d988495173f1aaa790eef42c0c1a31d..c336308194e8ebbfb5c7432a5593a9b8f82dfdc8 100644 --- a/lib/cronjobs/send_mail_notifications.class.php +++ b/lib/cronjobs/send_mail_notifications.class.php @@ -94,6 +94,8 @@ class SendMailNotificationsJob extends CronJob */ public function execute($last_result, $parameters = []) { + $cli_user = $GLOBALS['user']; + $notification = new ModulesNotification(); $query = "SELECT DISTINCT user_id @@ -112,6 +114,8 @@ class SendMailNotificationsJob extends CronJob return; } + $GLOBALS['user'] = new Seminar_user($user); + $ok = false; $mailmessage = $notification->getAllNotifications($user->id); @@ -135,5 +139,7 @@ class SendMailNotificationsJob extends CronJob } } ); + + $GLOBALS['user'] = $cli_user; } }