fix for the "Cannot modify header information - headers already sent by .../header.php" warning on login page

This commit is contained in:
Adnan ELARAJI 2024-12-08 17:07:03 +01:00
parent 1316fcf6d9
commit 4c92934032
No known key found for this signature in database

View file

@ -3,19 +3,18 @@ require_once("partials/base.php");
$title = "Login - ".$title;
include 'partials/header.php';
?>
<?php
// Password comes from libs/session.php
if (isset($_SESSION['password'])) {
if ($_SESSION['password'] == $password) {
header("Location: .");
include 'partials/header.php';
die();
}
}
else { ?>
else {
include 'partials/header.php';
?>
<center>
<h2>Enter password or TOTP</h2>
<form method="post" action="" id="login_form">