Redaxscript\Auth::getUser PHP Метод

getUser() публичный Метод

get the user
С версии: 3.0.0
public getUser ( string $key = null ) : mixed
$key string key of the user
Результат mixed
    public function getUser($key = null)
    {
        if (array_key_exists($key, $this->_userArray)) {
            return $this->_userArray[$key];
        } else {
            if (!$key) {
                return $this->_userArray;
            }
        }
        return false;
    }

Usage Example

Пример #1
0
 /**
  * adminPanelNotification
  *
  * @since 3.0.0
  *
  * return array
  */
 public static function adminPanelNotification()
 {
     $auth = new Auth(Request::getInstance());
     $auth->init();
     /* demo user */
     if ($auth->getUser('user') === 'demo') {
         self::setNotification('success', Language::get('logged_in') . Language::get('point'));
     }
     return self::getNotification();
 }
All Usage Examples Of Redaxscript\Auth::getUser