]> wagnertech.de Git - timetracker.git/blobdiff - cron.php
Fixed the problem when notifications stopped working after deleting a co-manager.
[timetracker.git] / cron.php
index d782546127d2e62bf5410599679837af1e34db6b..cf5ac0dde56d11df60ba36c0d544010cd9f8f927 100644 (file)
--- a/cron.php
+++ b/cron.php
@@ -58,10 +58,12 @@ while ($val = $res->fetchRow()) {
 
   // Get favorite report details.
   $report = ttFavReportHelper::getReport($val['report_id']);
-  if (!$report) continue;
+  if (!$report) continue; // Skip not found report.
 
-  // Recycle global $user and $i18n objects, as user settings and language are specific for each report.
+  // Recycle global $user object, as user settings are specific for each report.
   $user = new ttUser(null, $report['user_id']);
+  if (!$user->id) continue; // Skip not found user.
+  // Recycle $i18n object because language is user-specific.
   $i18n->load($user->lang);
 
   // Check condition on a report.