PHP Class Themosis\User\User

Inheritance: extends WP_Use\WP_User
Afficher le fichier Open project: themosis/framework Class Usage Examples

Méthodes publiques

Méthode Description
can ( string $cap ) : boolean Check if the user can do a defined capability.
hasRole ( string $role ) : boolean Check if the user has role.
setRole ( string $role ) : User Set User role.
update ( array $userdata ) : User | WP_Error Update the user properties.

Method Details

can() public méthode

Check if the user can do a defined capability.
public can ( string $cap ) : boolean
$cap string
Résultat boolean

hasRole() public méthode

Check if the user has role.
public hasRole ( string $role ) : boolean
$role string
Résultat boolean

setRole() public méthode

Set User role.
public setRole ( string $role ) : User
$role string
Résultat User

update() public méthode

Update the user properties.
public update ( array $userdata ) : User | WP_Error
$userdata array
Résultat User | WP_Error