]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11568 prevent warning from $USER->mnehostid when not logged in
authorskodak <skodak>
Sun, 7 Oct 2007 13:46:46 +0000 (13:46 +0000)
committerskodak <skodak>
Sun, 7 Oct 2007 13:46:46 +0000 (13:46 +0000)
lib/setup.php

index d1fcc9dd502726f21808e5625189de7c2cad80b1..3fd526758035d880637813d72447a7f4c4a29e37 100644 (file)
@@ -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