logout-fix
This commit is contained in:
+1
-1
@@ -164,7 +164,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<form method="post" action="php/controller/logout-controller.php" class="nav__logout-form">
|
<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">
|
<button type="submit" class="nav__item nav__button">
|
||||||
Abmelden
|
Abmelden
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
if (isset($_SESSION["user"])) {
|
|
||||||
echo "vorhanden1";
|
|
||||||
}
|
|
||||||
$_SESSION = [];
|
$_SESSION = [];
|
||||||
session_destroy();
|
session_destroy();
|
||||||
if (isset($_SESSION["user"])) {
|
|
||||||
echo "vorhanden1";
|
|
||||||
}
|
|
||||||
|
|
||||||
//header("Location: ../../index.php");
|
header("Location: ../../index.php");
|
||||||
echo $_SESSION["csrf_token"] ?? "";
|
|
||||||
echo $_SESSION["user_email"] ?? "";
|
|
||||||
exit();
|
exit();
|
||||||
Reference in New Issue
Block a user