From: martinlanghoff <martinlanghoff> Date: Wed, 17 Jan 2007 01:00:08 +0000 (+0000) Subject: mnet: restore_create_users() fixed mnethost lookup X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fdce65dd32ff8ecc98e5b03385c44edc03ee9634;p=moodle.git mnet: restore_create_users() fixed mnethost lookup Credit goes to Eloy for catching my error. --- diff --git a/backup/restorelib.php b/backup/restorelib.php index 4740f00399..442d9df1b2 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -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