From: moodler Date: Fri, 8 Oct 2004 06:06:03 +0000 (+0000) Subject: Checked in something that hadn't been X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6d8f47d64f6e3ce218130fbfeb5ffd8b35677e32;p=moodle.git Checked in something that hadn't been --- 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) {