PHP Class YWebUser

Inheritance: extends CWebUser
Show file Open project: yupe/yupe

Public Properties

Property Type Description
$allowAutoLogin boolean
$attempt integer
$authTimeout integer
$authToken string
$autoRenewCookie boolean
$rbacCacheNameSpace string

Protected Properties

Property Type Description
$_profiles array

Public Methods

Method Description
beforeLogin ( mixed $id, array $states, boolean $fromCookie ) : boolean
getAvatar ( integer $size = 64 ) : mixed
getProfile ( string $moduleName = 'yupe' ) : User | null Метод возвращающий профайл пользователя: s
getProfileField ( $field, string $module = 'yupe' ) : array | mixed | null
isAuthenticated ( ) : boolean Метод который проверяет, авторизирован ли пользователь:
isSuperUser ( ) : boolean Метод проверки пользователя на принадлежность к админам:
login ( IUserIdentity $identity, integer $duration ) : boolean

Protected Methods

Method Description
afterLogin ( boolean $fromCookie ) : parent::afterLogin() Метод для действий после входа в систему:
afterLogout ( ) : parent::afterLogout() Метод для действий после выхода из системы:

Method Details

afterLogin() protected method

Метод для действий после входа в систему:
protected afterLogin ( boolean $fromCookie ) : parent::afterLogin()
$fromCookie boolean - is authorize from cookie
return parent::afterLogin()

afterLogout() protected method

Метод для действий после выхода из системы:
protected afterLogout ( ) : parent::afterLogout()
return parent::afterLogout()

beforeLogin() public method

public beforeLogin ( mixed $id, array $states, boolean $fromCookie ) : boolean
$id mixed
$states array
$fromCookie boolean
return boolean

getAvatar() public method

public getAvatar ( integer $size = 64 ) : mixed
$size integer
return mixed

getProfile() public method

Метод возвращающий профайл пользователя: s
public getProfile ( string $moduleName = 'yupe' ) : User | null
$moduleName string - идентификатор модуля
return User | null - Модель пользователя в случае успеха, иначе null

getProfileField() public method

public getProfileField ( $field, string $module = 'yupe' ) : array | mixed | null
$field
$module string
return array | mixed | null

isAuthenticated() public method

Метод который проверяет, авторизирован ли пользователь:
public isAuthenticated ( ) : boolean
return boolean авторизирован ли пользователь

isSuperUser() public method

Метод проверки пользователя на принадлежность к админам:
public isSuperUser ( ) : boolean
return boolean is super user

login() public method

public login ( IUserIdentity $identity, integer $duration ) : boolean
$identity IUserIdentity
$duration integer
return boolean

Property Details

$_profiles protected property

protected array $_profiles
return array

$allowAutoLogin public property

public bool $allowAutoLogin
return boolean

$attempt public property

public int $attempt
return integer

$authTimeout public property

public int $authTimeout
return integer

$authToken public property

public string $authToken
return string

$autoRenewCookie public property

public bool $autoRenewCookie
return boolean

$rbacCacheNameSpace public property

Since: 0.8
public string $rbacCacheNameSpace
return string