summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Core/Session.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/Core/Session.php b/app/Core/Session.php
index 5c55311a..af7a9123 100644
--- a/app/Core/Session.php
+++ b/app/Core/Session.php
@@ -66,6 +66,25 @@ class Session
*/
public function close()
{
+ // Flush all sessions variables
+ $_SESSION = array();
+
+ // Destroy the session cookie
+ if (ini_get('session.use_cookies')) {
+ $params = session_get_cookie_params();
+
+ setcookie(
+ session_name(),
+ '',
+ time() - 42000,
+ $params['path'],
+ $params['domain'],
+ $params['secure'],
+ $params['httponly']
+ );
+ }
+
+ // Destroy session data
session_destroy();
}