MDL-26322 always allow https in login local redirection test

This fixes problems for sites that use loginhtts where the redirection after login did not work for pages that require https such as the forgotten passowrds page.
This commit is contained in:
Petr Skoda 2011-02-11 11:23:06 +01:00
parent d911c72bf9
commit b792a64ab2

View File

@ -182,7 +182,7 @@ if ($frm and isset($frm->username)) { // Login WITH
$urltogo = $CFG->wwwroot.'/user/edit.php';
// We don't delete $SESSION->wantsurl yet, so we get there later
} else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
} else if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0 or strpos($SESSION->wantsurl, str_replace('http://', 'https://', $CFG->wwwroot)) === 0)) {
$urltogo = $SESSION->wantsurl; /// Because it's an address in this site
unset($SESSION->wantsurl);