MDL-9481 Prevent redirection to alt login url after login (when url on the same server)

This commit is contained in:
skodak 2007-04-21 07:40:40 +00:00
parent 4acffa4997
commit b3df98189d

View file

@ -278,6 +278,11 @@ httpsrequired();
if (!empty($CFG->alternateloginurl)) { if (!empty($CFG->alternateloginurl)) {
$loginurl = $CFG->alternateloginurl; $loginurl = $CFG->alternateloginurl;
if (strpos($SESSION->wantsurl, $loginurl) === 0) {
//we do not want to return to alternate url
$SESSION->wantsurl = NULL;
}
if ($errorcode) { if ($errorcode) {
if (strpos($loginurl, '?') === false) { if (strpos($loginurl, '?') === false) {
$loginurl .= '?'; $loginurl .= '?';