mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
MDL-11568 prevent warning from $USER->mnehostid when not logged in
This commit is contained in:
parent
8ce8fc85fc
commit
1d19804aa3
@ -519,6 +519,9 @@ global $HTTPSPAGEREQUIRED;
|
||||
$SESSION = NULL;
|
||||
$USER = new object();
|
||||
$USER->id = 0; // user not logged in when session disabled
|
||||
if (isset($CFG->mnet_localhost_id)) {
|
||||
$USER->mnethostid = $CFG->mnet_localhost_id;
|
||||
}
|
||||
}
|
||||
|
||||
if (defined('FULLME')) { // Usually in command-line scripts like admin/cron.php
|
||||
|
Loading…
x
Reference in New Issue
Block a user