mnet: restore_create_users() fixed mnethost lookup

Credit goes to Eloy for catching my error.
This commit is contained in:
martinlanghoff 2007-01-17 01:00:08 +00:00
parent d36afd6d43
commit fdce65dd32

View File

@ -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