]> git.mjollnir.org Git - moodle.git/commitdiff
mnet: restore_create_users() fixed mnethost lookup
authormartinlanghoff <martinlanghoff>
Wed, 17 Jan 2007 01:00:08 +0000 (01:00 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 17 Jan 2007 01:00:08 +0000 (01:00 +0000)
Credit goes to Eloy for catching my error.

backup/restorelib.php

index 4740f0039910c2d771275f06777df972b3e22e13..442d9df1b258fe91ae8a75462412fbe8ef9b641c 100644 (file)
                     $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