From 8a45fcdfda9bfea376b7f66db7397167948f657b Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 5 Jan 2007 08:51:14 +0000 Subject: [PATCH] Prevent warnings for user when upgrading to mnet MDL-8082 --- lib/db/upgrade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 1042389d44..0693f3d029 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -19,7 +19,7 @@ function xmldb_main_upgrade($oldversion=0) { - global $CFG, $THEME, $db; + global $CFG, $THEME, $USER, $db; $result = true; @@ -385,6 +385,10 @@ function xmldb_main_upgrade($oldversion=0) { // Create the table $result = $result && create_table($table); + if (empty($USER->mnet_host_id)) { + $USER->mnet_host_id = 1; // Something for the current user to prevent warnings + } + /** ** enrol/mnet tables **/ -- 2.39.5