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

@@ -4,7 +4,4 @@ if(UserSession::isUserSignedIn()){
}else{
include("./view/pagecontent/header/content_header_signedout.php");
}
if(!UserSession::isSessionValid()){
include_once("./model/actions/model_signout.php");
}
?>

View File

@@ -3,5 +3,5 @@ include_once("./controller/AssetHandler.php");
AssetHandler::printAsset("logo.png", true, 128);
?>
<nav>
<a href="?a=signout">log out</a> <a href="?p=">home</a> <a href="?p=create_topic">create thread</a> <a href="?p=destroy">simulate $_SESSION expiry</a>
<a href="?action=signout">log out</a> <a href="?p=">home</a> <a href="?p=create_topic">create thread</a> <a href="?action=destroy">simulate $_SESSION expiry</a>
</nav>