Skip to content

Commit

Permalink
fix: check if in maintenance before setting Session variable
Browse files Browse the repository at this point in the history
  • Loading branch information
PandorasActorMS committed Aug 19, 2024
1 parent 769b9c2 commit 7be786b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions private/pages/oidc_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
$firstname = $oidc->requestUserInfo('given_name');
$surname = $oidc->requestUserInfo('family_name');
$initials = substr($firstname, 0, 1) . substr($surname, 0, 1);
#
$_SESSION['initials'] = $initials;

$_SESSION['username'] = $oidc->requestUserInfo('email');

//TODO: check for affiliation
if ((isset($env) ? strtolower($env["Authentication"]) : strtolower(getenv("Authentication"))) == "you_shall_not_pass") {
header("Location: /login");
exit();
}

$_SESSION['initials'] = $initials;

$_SESSION['username'] = $oidc->requestUserInfo('email');

header("Location: /interface");
exit();

Expand Down

0 comments on commit 7be786b

Please sign in to comment.