From a61b898a30c9459b1fa1f53ede13939ee26b96d6 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 22 Jan 2005 03:27:37 +0000 Subject: [PATCH] Ensure that $CFG->siteidentifier is always defined (32-byte key) --- admin/index.php | 5 +++++ 1 file changed, 5 insertions(+) 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"); -- 2.39.5