summaryrefslogtreecommitdiff
path: root/include/sessions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-28 09:09:41 +0400
committerAndrew Dolgov <[email protected]>2013-03-28 09:09:41 +0400
commit60ed4c9ad50e10dc2e91991de32df5e9289ceda6 (patch)
treeda87087f2fe1b2252b3456044d4440ed5e5f9431 /include/sessions.php
parent79bb55892baf86f05725053135f63d3e15cc99d0 (diff)
add yet another workaround for stuck login due to session cookies
Diffstat (limited to 'include/sessions.php')
-rw-r--r--include/sessions.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sessions.php b/include/sessions.php
index a83daea82..acb2fc38d 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -107,6 +107,13 @@
if (!defined('TTRSS_SESSION_NAME') || TTRSS_SESSION_NAME != 'ttrss_api_sid') {
if ($_COOKIE[$session_name]) {
@session_start();
+
+ if (!$_SESSION["uid"]) {
+ session_destroy();
+ if (isset($_COOKIE[session_name()])) {
+ setcookie(session_name(), '', time()-42000, '/');
+ }
+ }
}
}
?>