mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-67024 Lib: Check if user->mnethostid is set before using it
This commit is contained in:
parent
f2fc4a9fa1
commit
caf5ebb582
@ -1609,7 +1609,8 @@ class moodle_page {
|
||||
}
|
||||
|
||||
$mnetpeertheme = '';
|
||||
if (isloggedin() and isset($CFG->mnet_localhost_id) and $USER->mnethostid != $CFG->mnet_localhost_id) {
|
||||
$mnetvarsok = isset($CFG->mnet_localhost_id) && isset($USER->mnethostid);
|
||||
if (isloggedin() and $mnetvarsok and $USER->mnethostid != $CFG->mnet_localhost_id) {
|
||||
require_once($CFG->dirroot.'/mnet/peer.php');
|
||||
$mnetpeer = new mnet_peer();
|
||||
$mnetpeer->set_id($USER->mnethostid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user