mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-11568 prevent warning from $USER->mnehostid when not logged in
This commit is contained in:
parent
8ce8fc85fc
commit
1d19804aa3
1 changed files with 3 additions and 0 deletions
|
@ -519,6 +519,9 @@ global $HTTPSPAGEREQUIRED;
|
||||||
$SESSION = NULL;
|
$SESSION = NULL;
|
||||||
$USER = new object();
|
$USER = new object();
|
||||||
$USER->id = 0; // user not logged in when session disabled
|
$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
|
if (defined('FULLME')) { // Usually in command-line scripts like admin/cron.php
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue