Update deleteArticle-controller.php
This commit is contained in:
@@ -7,10 +7,13 @@ require_once __DIR__ . "/../model/ArticleManager.php";
|
|||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
|
|
||||||
if (isset($_SESSION["user"])){
|
if (isset($_SESSION["user_email"])) {
|
||||||
$user = $_SESSION["user"];
|
$user = $_SESSION["user_email"];
|
||||||
} else {
|
} else {
|
||||||
header("location: ../../index.php?pfad=login");
|
$_SESSION = [];
|
||||||
|
session_destroy();
|
||||||
|
|
||||||
|
header("Location: index.php");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user