]> git.mjollnir.org Git - moodle.git/commitdiff
Checked in something that hadn't been
authormoodler <moodler>
Fri, 8 Oct 2004 06:06:03 +0000 (06:06 +0000)
committermoodler <moodler>
Fri, 8 Oct 2004 06:06:03 +0000 (06:06 +0000)
lib/moodlelib.php

index 65d966fe9db3308f85e19925ac54f5e0593721ae..29b2891faeea8402172e517cafd35f4459061cca 100644 (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
     if ($courseid) {
         if ($courseid == SITEID) {