Skip to content

Commit

Permalink
Fix unwanted redirect to IdP from locallogin.php in case alternatelog…
Browse files Browse the repository at this point in the history
…inurl is set.
  • Loading branch information
tsbartel committed Nov 27, 2024
1 parent 57c6304 commit fe5d282
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions locallogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
$config = get_config('theme_boost_union');

// If the local login is not disabled, we just show a short friendly warning page and are done.
if ($config->loginlocalloginenable != THEME_BOOST_UNION_SETTING_SELECT_NO) {
// Also check if alternateloginurl for auth in general is set, so we can provide manual backup.
if ($config->loginlocalloginenable != THEME_BOOST_UNION_SETTING_SELECT_NO && empty($CFG->alternateloginurl)) {
echo $OUTPUT->header();
$loginurl = new core\url('/login/index.php');
$notification = new \core\output\notification(
Expand All @@ -61,8 +62,8 @@

// If the user is already logged in or is a guest user.
if (isloggedin() || isguestuser()) {
// We just redirect him to the standard login page to handle this case.
redirect('/login/index.php');
// We just redirect him to the starting page to handle this case.
redirect('/index.php');
}

// Set page title.
Expand Down

0 comments on commit fe5d282

Please sign in to comment.