emeneo / moodle-local_course_templates

With this moodle plugin you can easily create courses based on course templates. The plugin also can be used to easily duplicate courses.
11 stars 11 forks source link

$USER can be null #30

Open ewallah opened 11 months ago

ewallah commented 11 months ago

The $USER variable can be null in certain situations, so this should be checked in the settings file.

dml_missing_record_exception: Invalid user (SELECT id FROM {user} WHERE id = ? AND deleted = ?
[array (
  0 => 0,
  1 => 0,
)])

lib/dml/moodle_database.php:1654
lib/dml/moodle_database.php:1630
lib/classes/context/user.php:166
local/course_templates/settings.php:29
Ewa55 commented 3 months ago

I have the same problem that occurs when upgrading to a newer version of Totara, e.g. 18.6