From: moodler Date: Sat, 22 Jan 2005 03:27:37 +0000 (+0000) Subject: Ensure that $CFG->siteidentifier is always defined (32-byte key) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a61b898a30c9459b1fa1f53ede13939ee26b96d6;p=moodle.git Ensure that $CFG->siteidentifier is always defined (32-byte key) --- diff --git a/admin/index.php b/admin/index.php index a0a59706a1..bebc22d205 100644 --- a/admin/index.php +++ b/admin/index.php @@ -252,6 +252,11 @@ redirect("site.php"); } +/// Define the unique site ID code if it isn't already + if (empty($CFG->siteidentifier)) { // Unique site identification code + set_config('siteidentifier', random_string(32)); + } + /// Set up the admin user if (! record_exists("user_admins")) { // No admin user yet redirect("user.php");