UserManager
in package
Service class for managing users and their permissions
Table of Contents
Properties
Methods
- __construct() : mixed
- canAssignPermissions() : bool
- Returns true if the managing user can assign permissions to the target user.
- canAssignRole() : bool
- Returns true if the managing user can assign roles to the target user.
- canEdit() : bool
- Returns true if the managing user can edit the attribute of the target user Return true if target is same then managing (user can always update himself)
- deleteUser() : OperationResult
- Deletes the user with the given id.
Properties
$managingUser
private
LSWebUser
$managingUser
the user managing other users
$targetUser
private
User
$targetUser
the user being handled
Methods
__construct()
public
__construct([LSWebUser|null $managingUser = null ][, User|null $targetUser = null ]) : mixed
Parameters
canAssignPermissions()
Returns true if the managing user can assign permissions to the target user.
public
canAssignPermissions() : bool
Return values
boolcanAssignRole()
Returns true if the managing user can assign roles to the target user.
public
canAssignRole() : bool
Return values
boolcanEdit()
Returns true if the managing user can edit the attribute of the target user Return true if target is same then managing (user can always update himself)
public
canEdit() : bool
Return values
booldeleteUser()
Deletes the user with the given id.
public
deleteUser(int $userId) : OperationResult
Parameters
- $userId : int