From 1d19804aa311c0e43bdb350d1eed3721bec543fd Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 7 Oct 2007 13:46:46 +0000 Subject: [PATCH] MDL-11568 prevent warning from $USER->mnehostid when not logged in --- lib/setup.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/setup.php b/lib/setup.php index d1fcc9dd50..3fd5267580 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -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 -- 2.39.5