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

This commit is contained in:
skodak 2007-04-03 14:59:56 +00:00
parent 9f9217cda1
commit ad56b73774

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 = '';