This commit is contained in:
gustav_delius
2004-06-30 12:09:29 +00:00
parent 1218d4702e
commit fe6571366c
5 changed files with 23 additions and 3 deletions
+4 -2
View File
@@ -365,11 +365,13 @@ function require_login($courseid=0) {
$SESSION->fromurl = $_SERVER["HTTP_REFERER"];
}
$USER = NULL;
$loginguest = (isset($CFG->loginguests) and $CFG->autologinguests
and $courseid and get_field('course','guest','id',$courseid)) ? '?loginguest=true' : '';
if (empty($CFG->loginhttps)) {
redirect("$CFG->wwwroot/login/index.php");
redirect("$CFG->wwwroot/login/index.php$loginguest");
} else {
$wwwroot = str_replace('http','https',$CFG->wwwroot);
redirect("$wwwroot/login/index.php");
redirect("$wwwroot/login/index.php$loginguest");
}
die;
}