Refactored/ streamlined UserSession code

Makes it easier to tell when a user is signed in
This commit is contained in:
2019-05-24 23:53:49 +02:00
parent 09e9e616ec
commit be9e69c71c
9 changed files with 33 additions and 31 deletions

View File

@@ -0,0 +1,4 @@
<?php
session_destroy();
session_start();
?>

View File

@@ -1,7 +1,4 @@
<?php
include_once("./controller/UserSession.php");
if(UserSession::isSessionValid()){
Database::invalidateSession(UserSession::getSession()->token);
}
Database::invalidateSession($_COOKIE['usersession']);
session_destroy();
?>