PHP Class amnah\yii2\user\components\User

Inheritance: extends yii\web\User
Show file Open project: amnah/yii2-user

Public Properties

Property Type Description
$enableAutoLogin
$identityClass
$loginUrl

Public Methods

Method Description
afterLogin ( $identity, $cookieBased, $duration )
can ( string $permissionName, array $params = [], boolean $allowCaching = true ) : boolean Check if user can do $permissionName.
getDisplayName ( ) : string Get user's display name
getIsGuest ( )
getIsLoggedIn ( ) : boolean Check if user is logged in

Method Details

afterLogin() public method

public afterLogin ( $identity, $cookieBased, $duration )

can() public method

If "authManager" component is set, this will simply use the default functionality. Otherwise, it will use our custom permission system
public can ( string $permissionName, array $params = [], boolean $allowCaching = true ) : boolean
$permissionName string
$params array
$allowCaching boolean
return boolean

getDisplayName() public method

Get user's display name
public getDisplayName ( ) : string
return string

getIsGuest() public method

public getIsGuest ( )

getIsLoggedIn() public method

Check if user is logged in
public getIsLoggedIn ( ) : boolean
return boolean

Property Details

$enableAutoLogin public property

public $enableAutoLogin

$identityClass public property

public $identityClass

$loginUrl public property

public $loginUrl