diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index cc9fd5f1ca52d..57c2eb780f00b 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1609,6 +1609,10 @@ public function insert_cronjobs() global $conf, $user; + if (empty($user)) { + $user = new User($this->db); + } + $err = 0; if (is_array($this->cronjobs)) {