From: skodak Date: Sat, 21 Apr 2007 07:40:40 +0000 (+0000) Subject: MDL-9481 Prevent redirection to alt login url after login (when url on the same server) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b3df98189d0451dc808ac2bed33da8f1cfd0ad27;p=moodle.git MDL-9481 Prevent redirection to alt login url after login (when url on the same server) --- diff --git a/login/index.php b/login/index.php index e9099e5a22..8c64841472 100644 --- a/login/index.php +++ b/login/index.php @@ -278,6 +278,11 @@ httpsrequired(); if (!empty($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 (strpos($loginurl, '?') === false) { $loginurl .= '?';