Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

mnet: restore_create_users() fixed mnethost lookup

Credit goes to Eloy for catching my error.
  • Loading branch information...
commit fdce65dd32ff8ecc98e5b03385c44edc03ee9634 1 parent d36afd6
martinlanghoff authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 backup/restorelib.php
View
4 backup/restorelib.php
@@ -1483,8 +1483,8 @@ function restore_create_users($restore,$xml_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
Please sign in to comment.
Something went wrong with that request. Please try again.