mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
mnet: restore_create_users() fixed mnethost lookup
Credit goes to Eloy for catching my error.
This commit is contained in:
parent
d36afd6d43
commit
fdce65dd32
@ -1483,8 +1483,8 @@
|
||||
$user->mnethostid = $CFG->mnet_localhost_id;
|
||||
} else {
|
||||
// fast url-to-id lookups
|
||||
if (isset($mnethosts->{$user->mnethosturl})) {
|
||||
$user->mnethostid = $mnethosts->{$user->mnethosturl};
|
||||
if (isset($mnethosts[$user->mnethosturl])) {
|
||||
$user->mnethostid = $mnethosts[$user->mnethosturl]->id;
|
||||
} else {
|
||||
// should not happen, as we check in restore_chech.php
|
||||
// but handle the error if it does
|
||||
|
Loading…
x
Reference in New Issue
Block a user