logout-fix

This commit is contained in:
2026-07-19 15:23:46 +02:00
parent ba749bca68
commit ec794db706
2 changed files with 3 additions and 10 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
</a>
<form method="post" action="php/controller/logout-controller.php" class="nav__logout-form">
<?php //csrf_field(); ?>
<?php csrf_field(); ?>
<button type="submit" class="nav__item nav__button">
Abmelden
</button>
+2 -9
View File
@@ -1,15 +1,8 @@
<?php
session_start();
if (isset($_SESSION["user"])) {
echo "vorhanden1";
}
$_SESSION = [];
session_destroy();
if (isset($_SESSION["user"])) {
echo "vorhanden1";
}
//header("Location: ../../index.php");
echo $_SESSION["csrf_token"] ?? "";
echo $_SESSION["user_email"] ?? "";
header("Location: ../../index.php");
exit();