]> git.mjollnir.org Git - moodle.git/commitdiff
Merged fixes for not-logged-in users from stable
authormoodler <moodler>
Sun, 29 Oct 2006 15:58:21 +0000 (15:58 +0000)
committermoodler <moodler>
Sun, 29 Oct 2006 15:58:21 +0000 (15:58 +0000)
lib/accesslib.php

index 8fca9d3d0f27fffb2d95a95c9e73980a17c1ba4a..2eb16b19de48a34a6af06ebb223ce974f4042a95 100755 (executable)
@@ -233,7 +233,7 @@ function require_capability($capability, $context=NULL, $userid=NULL, $doanythin
 
 /// If the current user is not logged in, then make sure they are
 
-    if (empty($userid) and empty($USER->id)) {
+    if (empty($userid) and empty($USER->capabilities)) {
         if ($context && ($context->contextlevel == CONTEXT_COURSE)) {
             require_login($context->instanceid);
         } else if ($context && ($context->contextlevel == CONTEXT_MODULE)) {