Merged fixes for not-logged-in users from stable

This commit is contained in:
moodler
2006-10-29 15:58:21 +00:00
parent 0909d44eac
commit 6605128ef8
+1 -1
View File
@@ -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)) {