Session logout now works

This commit is contained in:
Lars van Hijfte
2017-02-03 11:18:17 +01:00
parent 1862369013
commit c29be662bc
2 changed files with 3 additions and 2 deletions

View File

@@ -25,7 +25,8 @@ if(empty($_GET["username"])) {
$userID = getUserID($_GET["username"]);
}
if(!$user = selectUser($_SESSION["userID"], $userID)) {
if (isset($_SESSION["userID"]) and !$user = selectUser($_SESSION["userID"], $userID)) {
header("HTTP/1.0 404 Not Found");
header("Location: error/404.php");
die();