Skip to content

Commit

Permalink
MDL-9481 Prevent redirection to alt login url after login (when url o…
Browse files Browse the repository at this point in the history
…n the same server)
  • Loading branch information
skodak committed Apr 21, 2007
1 parent 4acffa4 commit b3df981
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions login/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@
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 .= '?';
Expand Down

0 comments on commit b3df981

Please sign in to comment.