From 6d8f47d64f6e3ce218130fbfeb5ffd8b35677e32 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 8 Oct 2004 06:06:03 +0000 Subject: [PATCH] Checked in something that hadn't been --- lib/moodlelib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 65d966fe9d..29b2891fae 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -749,6 +749,11 @@ function require_login($courseid=0, $autologinguest=true) { } } + // Make sure the USER has a sesskey set up. Used for checking script parameters. + if (empty($USER->sesskey)) { + $USER->sesskey = random_string(10); + } + // Next, check if the user can be in a particular course if ($courseid) { if ($courseid == SITEID) { -- 2.39.5