diff --git a/public_html/deployment/classes/user.class.php b/public_html/deployment/classes/user.class.php
index da03b92599e7a37c54f77066a3c5bf94f1b0febf..13dc9d68a565bedf8a658d18f99f67b3b7e10fdc 100644
--- a/public_html/deployment/classes/user.class.php
+++ b/public_html/deployment/classes/user.class.php
@@ -53,15 +53,15 @@ class user {
     
     
     /**
-     * detect a user
-     * @return type
+     * get string with detected user from current session / basic auth / cli access
+     * @return string
      */
     private function _autoDetectUser(){
         $sUser=false;
-        if (isset($_SESSION) && is_array($_SESSION) && array_key_exists("PHP_AUTH_USER", $_SESSION)){
+        if (isset($_SESSION) && isset($_SESSION["PHP_AUTH_USER"])){
             $sUser=$_SESSION["PHP_AUTH_USER"];
         }
-        if (!$sUser && is_array($_SERVER) && array_key_exists("PHP_AUTH_USER", $_SERVER)){
+        if (!$sUser && isset($_SERVER["PHP_AUTH_USER"])){
             $sUser=$_SERVER["PHP_AUTH_USER"];
         }
         if (php_sapi_name() == "cli") {
@@ -137,7 +137,7 @@ class user {
      */
     public function authenticate(){
         global $aConfig, $aParams;
-        
+        print_r($aConfig);
         if(!array_key_exists('auth', $aConfig) || !count($aConfig['auth']) || !array_key_exists('user', $aParams)){
             return false;
         }
@@ -180,10 +180,11 @@ class user {
     }
     
     /**
-     * set a authenticated user and get its roles
+     * set an authenticated user and get its roles
      */
     public function setUser(){
         $this->_sUsername=$this->_autoDetectUser();
+        
         $this->_getUserGroups();
         $this->_getUserPermission();
     }