From b3df98189d0451dc808ac2bed33da8f1cfd0ad27 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 21 Apr 2007 07:40:40 +0000 Subject: [PATCH] MDL-9481 Prevent redirection to alt login url after login (when url on the same server) --- login/index.php | 5 +++++ 1 file changed, 5 insertions(+) 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 .= '?'; -- 2.39.5