Refactored/ streamlined UserSession code
Makes it easier to tell when a user is signed in
This commit is contained in:
4
dev_mvc/model/actions/model_destroy.php
Normal file
4
dev_mvc/model/actions/model_destroy.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
session_destroy();
|
||||
session_start();
|
||||
?>
|
||||
@@ -1,7 +1,4 @@
|
||||
<?php
|
||||
include_once("./controller/UserSession.php");
|
||||
if(UserSession::isSessionValid()){
|
||||
Database::invalidateSession(UserSession::getSession()->token);
|
||||
}
|
||||
Database::invalidateSession($_COOKIE['usersession']);
|
||||
session_destroy();
|
||||
?>
|
||||
Reference in New Issue
Block a user