summaryrefslogtreecommitdiff
path: root/include/sessions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-10-15 14:53:35 +0300
committerAndrew Dolgov <[email protected]>2018-10-15 14:53:35 +0300
commit74736fce0f89efbaa971e6817303e8840c4aed8f (patch)
treed1296740bf548af064dd1aa202b06c3d41be83f5 /include/sessions.php
parent7d53c2b501cbc0e48f90c154b2f901fef08fbd33 (diff)
if empty session is autostarted because of a cookie, immediately destroy it
Diffstat (limited to 'include/sessions.php')
-rw-r--r--include/sessions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sessions.php b/include/sessions.php
index f625cd16f..2d17bfd8e 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -160,5 +160,9 @@
if (!defined('NO_SESSION_AUTOSTART')) {
if (isset($_COOKIE[session_name()])) {
@session_start();
+
+ if (!$_SESSION['uid']) {
+ logout_user();
+ }
}
}