From 3bfb83925963285c030aad8313c5f3bcab64d532 Mon Sep 17 00:00:00 2001 From: gtbu Date: Fri, 30 May 2025 21:45:00 +0200 Subject: [PATCH] update session.php - stability --- include/tool/Session.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/tool/Session.php b/include/tool/Session.php index 17637b5..c53258d 100644 --- a/include/tool/Session.php +++ b/include/tool/Session.php @@ -738,11 +738,13 @@ class Session{ } //alias - if( isset($_COOKIE['gp_alias']) ){ - $GLOBALS['gpAdmin']['useralias'] = $_COOKIE['gp_alias']; - }else{ - $GLOBALS['gpAdmin']['useralias'] = $GLOBALS['gpAdmin']['username']; - } + if( isset($_COOKIE['gp_alias']) ){ + $GLOBALS['gpAdmin']['useralias'] = $_COOKIE['gp_alias']; + } else { + if (isset($GLOBALS['gpAdmin']['username'])) { + $GLOBALS['gpAdmin']['useralias'] = $GLOBALS['gpAdmin']['username']; + } else { $GLOBALS['gpAdmin']['useralias'] = ''; } + } } @@ -966,7 +968,7 @@ class Session{ if( stripos($doc_start, '') !== false ){ return ''; } - return ''; + return ''; }