Merge pull request #20 from aelaraji/login_php

fix for the "Cannot modify header information..." warning on login page.
This commit is contained in:
sørenpeter 2024-12-08 18:34:32 +01:00 committed by GitHub
commit 9ed237810d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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">
@ -26,4 +25,4 @@ include 'partials/header.php';
</center>
<?php } ?>
<!-- PHP: GET FOOTER --><?php include 'partials/footer.php';?>
<!-- PHP: GET FOOTER --><?php include 'partials/footer.php';?>