From 6605128ef85810863fd9cfaefb4a82256ae4a2aa Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 29 Oct 2006 15:58:21 +0000 Subject: [PATCH] Merged fixes for not-logged-in users from stable --- lib/accesslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 8fca9d3d0f..2eb16b19de 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -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)) { -- 2.39.5