PHP Class Pagekit\User\Model\User

Inheritance: implements Pagekit\Auth\UserInterface, implements JsonSerializable, use trait Pagekit\System\Model\DataModelTrait, use trait UserModelTrait
Show file Open project: pagekit/pagekit Class Usage Examples

Public Properties

Property Type Description
$activation
$email
$id
$login
$name
$password
$registered
$status
$url
$username

Protected Properties

Property Type Description
$permissions array

Public Methods

Method Description
getId ( )
getPassword ( )
getStatusText ( )
getStatuses ( )
getUsername ( )
hasAccess ( string $expression ) : boolean Check if the user has access for a provided access expression.
hasPermission ( string $permission ) : boolean Check if the user has access for a provided permission identifier
isActive ( ) : boolean Check if the user is active.
isAdministrator ( ) : boolean Check if the user has the administrator role.
isAnonymous ( ) : boolean Check if the user has the anonymous role.
isAuthenticated ( ) : boolean Check if the user has the authenticated role.
isBlocked ( ) : boolean Check if the user is blocked.
jsonSerialize ( )
validate ( )

Method Details

getId() public method

public getId ( )

getPassword() public method

public getPassword ( )

getStatusText() public method

public getStatusText ( )

getStatuses() public static method

public static getStatuses ( )

getUsername() public method

public getUsername ( )

hasAccess() public method

Expression forms: - a single permission string starting with a letter and consisting of letters, numbers and characters .:-_ and whitespace - a boolean expression with multiple permissions and operators like &&, || and (...) parenthesis Examples: - a single permission string can be "create_posts", "create posts", "posts:create" etc. - a boolean expression with multiple permissions boolean expression can be "create_posts && delete_posts", "(create posts && delete posts) || manage posts" etc.
public hasAccess ( string $expression ) : boolean
$expression string
return boolean

hasPermission() public method

Check if the user has access for a provided permission identifier
public hasPermission ( string $permission ) : boolean
$permission string
return boolean

isActive() public method

Check if the user is active.
public isActive ( ) : boolean
return boolean

isAdministrator() public method

Check if the user has the administrator role.
public isAdministrator ( ) : boolean
return boolean

isAnonymous() public method

Check if the user has the anonymous role.
public isAnonymous ( ) : boolean
return boolean

isAuthenticated() public method

Check if the user has the authenticated role.
public isAuthenticated ( ) : boolean
return boolean

isBlocked() public method

Check if the user is blocked.
public isBlocked ( ) : boolean
return boolean

jsonSerialize() public method

public jsonSerialize ( )

validate() public method

public validate ( )

Property Details

$activation public property

public $activation

$email public property

public $email

$id public property

public $id

$login public property

public $login

$name public property

public $name

$password public property

public $password

$permissions protected property

protected array $permissions
return array

$registered public property

public $registered

$status public property

public $status

$url public property

public $url

$username public property

public $username