From f879340f2e5f4a6f520da92b12572364e393f920 Mon Sep 17 00:00:00 2001 From: Davo Smith Date: Mon, 13 Jul 2015 11:51:47 +0100 Subject: [PATCH] Fix backup & restore errors with temporary users --- tempusers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tempusers.php b/tempusers.php index df1733f..8fc2a3d 100644 --- a/tempusers.php +++ b/tempusers.php @@ -64,6 +64,7 @@ if ($data = $mform->get_data()) { $user->email = time().'@ghost.user.de'; $user->username = time().'@ghost.user.de'; $user->idnumber = 'tempghost'; + $user->mnethostid = $CFG->mnet_localhost_id; $studentid = $DB->insert_record('user', $user); // Create the temporary user record.