]> git.mjollnir.org Git - moodle.git/commitdiff
Made is_mnet_remote_user() a bit more robust MDL-8253
authormoodler <moodler>
Mon, 22 Jan 2007 08:25:20 +0000 (08:25 +0000)
committermoodler <moodler>
Mon, 22 Jan 2007 08:25:20 +0000 (08:25 +0000)
lib/moodlelib.php

index bfa5d10216bb0883c58572f222c53b42d81a552a..a6cb7004e8cc2f6a3c86632034d1b32860b3720f 100644 (file)
@@ -6626,7 +6626,7 @@ function is_mnet_remote_user($user) {
         unset($env);
     }
 
-    return ($user->mnethostid != $CFG->mnet_localhost_id);
+    return (!empty($user->mnethostid) && $user->mnethostid != $CFG->mnet_localhost_id);
 }
 
 /**