Checked in something that hadn't been

This commit is contained in:
moodler 2004-10-08 06:06:03 +00:00
parent c7029edf84
commit 6d8f47d64f

View file

@ -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 // Next, check if the user can be in a particular course
if ($courseid) { if ($courseid) {
if ($courseid == SITEID) { if ($courseid == SITEID) {