MDL-9170 https redirect doesn't happen on login page - fixed problem when guest button disabled

This commit is contained in:
skodak
2007-04-03 14:58:30 +00:00
parent 381070ab03
commit 74edbb3c5f
+1 -1
View File
@@ -1636,7 +1636,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null) {
if (!empty($_SERVER['HTTP_REFERER'])) {
$SESSION->fromurl = $_SERVER['HTTP_REFERER'];
}
if ($autologinguest and !empty($CFG->autologinguests) and ($COURSE->id == SITEID or $COURSE->guest) ) {
if ($autologinguest and !empty($CFG->guestloginbutton) and !empty($CFG->autologinguests) and ($COURSE->id == SITEID or $COURSE->guest) ) {
$loginguest = '?loginguest=true';
} else {
$loginguest = '';