🐛 Force remove headers before redirection
Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit is contained in:
@@ -67,3 +67,14 @@
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<section id="alerts">
|
||||
<?php
|
||||
foreach($_SESSION['alerts'] as $alert) {
|
||||
echo("
|
||||
<div class='alert alert-" . $alert['type'] . "' role='alert'>
|
||||
" . $alert['msg'] . "
|
||||
</div>
|
||||
") }
|
||||
?>
|
||||
</section>
|
||||
|
||||
@@ -22,6 +22,7 @@ if ($_ENV['OIDC_DISABLE_SSL'] == "true") {
|
||||
$oidc->setVerifyPeer(false);
|
||||
}
|
||||
|
||||
|
||||
// Custom functions
|
||||
function oidc_set_vars($sub, $uid, $fname, $lname, $email) {
|
||||
$_SESSION['uuid'] = $sub;
|
||||
@@ -39,3 +40,8 @@ function is_signed_in() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function create_alert($type, $msg) {
|
||||
$thisAlert = array($type, $msg);
|
||||
array_push($_SESSION['alerts'], $thisAlert);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
echo("Error running SQL (Add new user): <br>" . $e->getMessage() . "<br>");
|
||||
}
|
||||
|
||||
header_remove();
|
||||
header_remove("Location");
|
||||
header('Location: /view?rid=' . $tkt_uuid);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user