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 '';
}