Skip to content

Commit

Permalink
Bump. Now login page is 100% HTTPS if required.
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jul 14, 2005
1 parent 8fdba9a commit 5e7012b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions login/index.php
Expand Up @@ -4,6 +4,9 @@

$loginguest = optional_param('loginguest', false); // determines whether visitors are logged in as guest automatically

//HTTPS is potentially required in this page
httpsrequired();

/// Check if the guest user exists. If not, create one.
if (! record_exists("user", "username", "guest")) {
$guest->auth = "manual";
Expand Down Expand Up @@ -48,12 +51,7 @@
} else {
$currlang = current_language();
$langs = get_list_of_languages();
if (empty($CFG->loginhttps)) {
$wwwroot = $CFG->wwwroot;
} else {
$wwwroot = str_replace('http','https',$CFG->wwwroot);
}
$langmenu = popup_form ("$wwwroot/login/index.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
$langmenu = popup_form ("$CFG->httpswwwroot/login/index.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
}

$loginsite = get_string("loginsite");
Expand Down

0 comments on commit 5e7012b

Please sign in to comment.