summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/class/user.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php
index 6f05570..50679ee 100644
--- a/app/class/user.class.php
+++ b/app/class/user.class.php
@@ -131,7 +131,7 @@ class user extends agent
*/
public static function getCurrent() : ?user
{
- if (!session_start())
+ if ((session_status() != PHP_SESSION_ACTIVE) && !session_start())
throw new Exception("Unable to aquire a PHP session");
if (!isset($_SESSION['userguid']))
@@ -168,7 +168,7 @@ class user extends agent
*/
public static function setCurrent(?user $user = NULL) : void
{
- if (!session_start())
+ if ((session_status() != PHP_SESSION_ACTIVE) && !session_start())
throw new Exception("Unable to aquire a PHP session");
unset($_SESSION['userguid']);