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

get the user
С версии: 3.0.0
public getUser ( string $key = null ) : mixed
$key string key of the user
Результат mixed
Пример #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();
 }
Пример #2
0
 /**
  * testGetUserInvalid
  *
  * @since 3.0.0
  */
 public function testGetUserInvalid()
 {
     /* setup */
     $auth = new Auth($this->_request);
     $auth->login(1);
     /* actual */
     $actual = $auth->getUser('invalidKey');
     /* compare */
     $this->assertFalse($actual);
 }