fixed autologinguests warning

This commit is contained in:
skodak
2006-09-26 06:34:29 +00:00
parent 05f8f7e76b
commit 9a76d7b9ea
+1 -1
View File
@@ -1512,7 +1512,7 @@ function require_login($courseid=0, $autologinguest=true, $cm=null) {
$SESSION->fromurl = $_SERVER['HTTP_REFERER'];
}
$USER = NULL;
if ($autologinguest && $CFG->autologinguests and
if ($autologinguest && !empty($CFG->autologinguests) and
$courseid and ($courseid == SITEID or get_field('course','guest','id',$courseid)) ) {
$loginguest = '?loginguest=true';
} else {