Storage Engine handler for user module.
                    
    
    
    
        Methods
            
    Adds a policy to a role.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | mixed | - | - | 
                            
                    | $policy | Policy | - | - | 
                    
    
    Return values
    Policy
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                InvalidArgumentException
                                                                                         
        If $policy->limitation is empty (null, empty string/array..) 
Adds a policy to a role draft.
    
        
            
                |  | 
                        public addPolicyByRoleDraft(mixed $roleId, Policy $policy) : Policy
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | mixed | - | - | 
                            
                    | $policy | Policy | - | - | 
                    
    
    Return values
    Policy
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                InvalidArgumentException
                                                                                         
        If $policy->limitation is empty (null, empty string/array..) 
Assigns role to a user or user group with given limitations.
    
        
            
                |  | 
                        public assignRole(mixed $contentId, mixed $roleId[, array<string|int, mixed> $limitation = null ]) : mixed
 | 
        
    
 
    
    
        The limitation array looks like:
array(
'Subtree' => array(
'/1/2/',
'/1/4/',
),
'Foo' => array( 'Bar' ),
…
)
Where the keys are the limitation identifiers, and the respective values
are an array of limitation values. The limitation parameter is optional.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $contentId | mixed | - | The groupId or userId to assign the role to. | 
                            
                    | $roleId | mixed | - | - | 
                            
                    | $limitation | array<string|int, mixed> | null | - | 
                    
    
                    
            
    Copies an existing role.
    
    Parameters
    
    Return values
    Role
                        
            
    Counts Role's assignments taking into consideration related and existing user and user group objects.
    
        
            
                |  | 
                        public countRoleAssignments(int $roleId) : int
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | int | - | - | 
                    
    
    Return values
    int
                        
            
    Create a user.
    
    
        The User struct used to create the user will contain an ID which is used
to reference the user.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $user | User | - | - | 
                    
    
    Return values
    User
                        
            
    Create new role.
    
    Parameters
    
    Return values
    Role
                        
            
    Creates a draft of existing defined role.
    
        
            
                |  | 
                        public createRoleDraft(mixed $roleId) : Role
 | 
        
    
 
    
    
        Sets status to Role::STATUS_DRAFT on the new returned draft.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | mixed | - | - | 
                    
    
    Return values
    Role
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
        If role with defined status is not found 
Delete user with the given ID.
    
        
            
                |  | 
                        public delete(mixed $userId) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $userId | mixed | - | - | 
                    
    
                    
            
    Removes a policy from a role.
    
        
            
                |  | 
                        public deletePolicy(mixed $policyId, mixed $roleId) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $policyId | mixed | - | - | 
                            
                    | $roleId | mixed | - | - | 
                    
    
                    
            
    Delete the specified role (draft).
    
        
            
                |  | 
                        public deleteRole(mixed $roleId[, int $status = Role::STATUS_DEFINED ]) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | mixed | - | - | 
                            
                    | $status | int | Role::STATUS_DEFINED | One of Role::STATUS_DEFINED|Role::STATUS_DRAFT | 
                    
    
                    
            
    Expires user token with user hash.
    
        
            
                |  | 
                        public expireUserToken(string $hash) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $hash | string | - | - | 
                    
    
                    
            
    Loads user with user ID.
    
        
            
                |  | 
                        public load(mixed $userId) : User
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $userId | mixed | - | - | 
                    
    
    Return values
    User
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
                                    
Loads user with user email.
    
        
            
                |  | 
                        public loadByEmail(string $email) : User
 | 
        
    
 
    
    
        Note: This method loads user by $email case in-sensitive on certain storage engines!
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $email | string | - | - | 
                    
    
    Return values
    User
                        
            
    Loads user with user login.
    
        
            
                |  | 
                        public loadByLogin(string $login) : User
 | 
        
    
 
    
    
        Note: This method loads user by $login case in-sensitive on certain storage engines!
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $login | string | - | - | 
                    
    
    Return values
    User
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
                                    
Returns the user policies associated with the user (including inherited policies from user groups).
    
        
            
                |  | 
                        public loadPoliciesByUserId(mixed $userId) : array<string|int, Policy>
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $userId | mixed | - | In legacy storage engine this is the content object id roles are assigned to in ezuser_role. | 
                    
    
    Return values
    array<string|int, Policy>
                                                    
    
        Tags
        
    
    
                                                - 
                    Deprecated
                
- 
                                                                                                             
        Since 6.8, not currently in use as permission system needs to know about role assignment limitations. 
Loads a specified role (draft) by $roleId.
    
        
            
                |  | 
                        public loadRole(mixed $roleId[, int $status = Role::STATUS_DEFINED ]) : Role
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | mixed | - | - | 
                            
                    | $status | int | Role::STATUS_DEFINED | One of Role::STATUS_DEFINED|Role::STATUS_DRAFT | 
                    
    
    Return values
    Role
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
                                    
Loads role assignment for specified assignment ID.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleAssignmentId | mixed | - | - | 
                    
    
    Return values
    RoleAssignment
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
        If role assignment is not found 
Loads roles assignments to a user/group.
    
        
            
                |  | 
                        public loadRoleAssignmentsByGroupId(mixed $groupId[, bool $inherit = false ]) : array<string|int, RoleAssignment>
 | 
        
    
 
    
    
        Role Assignments with same roleId and limitationIdentifier will be merged together into one.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $groupId | mixed | - | In legacy storage engine this is the content object id roles are assigned to in ezuser_role.
By the nature of legacy this can currently also be used to get by $userId. | 
                            
                    | $inherit | bool | false | If true also return inherited role assignments from user groups. | 
                    
    
    Return values
    array<string|int, RoleAssignment>
                        
            
    Loads roles assignments Role.
    
        
            
                |  | 
                        public loadRoleAssignmentsByRoleId(mixed $roleId) : array<string|int, RoleAssignment>
 | 
        
    
 
    
    
        Role Assignments with same roleId and limitationIdentifier will be merged together into one.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | mixed | - | - | 
                    
    
    Return values
    array<string|int, RoleAssignment>
                        
            
    Loads Role's assignments based on provided $offset and $limit arguments.
    
        
            
                |  | 
                        public loadRoleAssignmentsByRoleIdWithOffsetAndLimit(int $roleId, int $offset, int|null $limit) : array<string|int, RoleAssignment>
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | int | - | - | 
                            
                    | $offset | int | - | - | 
                            
                    | $limit | int|null | - | - | 
                    
    
    Return values
    array<string|int, RoleAssignment>
                        
            
    Loads a specified role (draft) by $identifier.
    
        
            
                |  | 
                        public loadRoleByIdentifier(string $identifier[, int $status = Role::STATUS_DEFINED ]) : Role
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $identifier | string | - | - | 
                            
                    | $status | int | Role::STATUS_DEFINED | One of Role::STATUS_DEFINED|Role::STATUS_DRAFT | 
                    
    
    Return values
    Role
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
                                    
Loads a role draft by the original role ID.
    
        
            
                |  | 
                        public loadRoleDraftByRoleId(mixed $roleId) : Role
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleId | mixed | - | ID of the role the draft was created from. | 
                    
    
    Return values
    Role
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
                                    
Loads all roles.
    
        
            
                |  | 
                        public loadRoles() : array<string|int, Role>
 | 
        
    
 
    
    Return values
    array<string|int, Role>
                        
            
    Loads user with user hash.
    
        
            
                |  | 
                        public loadUserByToken(string $hash) : User
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $hash | string | - | - | 
                    
    
    Return values
    User
                                                    
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                NotFoundException
                                                                                         
                                    
Loads user(s) with user email.
    
        
            
                |  | 
                        public loadUsersByEmail(string $email) : array<string|int, User>
 | 
        
    
 
    
    
        As earlier Ibexa versions supported several users having same email (ini config),
this function may return several users.
Note: This method loads user by $email case in-sensitive on certain storage engines!
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $email | string | - | - | 
                    
    
    Return values
    array<string|int, User>
                        
            
    Publish the specified role draft.
    
        
            
                |  | 
                        public publishRoleDraft(mixed $roleDraftId) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleDraftId | mixed | - | - | 
                    
    
                    
            
    Un-assign a role, by assignment ID.
    
        
            
                |  | 
                        public removeRoleAssignment(mixed $roleAssignmentId) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $roleAssignmentId | mixed | - |  | 
                    
    
                    
            
    Un-assign a role.
    
        
            
                |  | 
                        public unassignRole(mixed $contentId, mixed $roleId) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $contentId | mixed | - | The user or user group Id to un-assign the role from. | 
                            
                    | $roleId | mixed | - | - | 
                    
    
                    
            
    Update the user information specified by the user struct.
    
        
            
                |  | 
                        public update(User $user) : mixed
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $user | User | - | - | 
                    
    
                    
            
    
        
            
                |  | 
                        public updatePassword(User $user) : void
 | 
        
    
 
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $user | User | - | - | 
                    
    
                    
            
    Update a policy.
    
        
            
                |  | 
                        public updatePolicy(Policy $policy) : mixed
 | 
        
    
 
    
    
        Replaces limitations values with new values.
    
    Parameters
    
        
            
                | Name | Type | Default value | Description | 
        
        
                            
                    | $policy | Policy | - | - | 
                    
    
                                                
    
        Tags
        
    
    
                                                - 
                    Throws
                
- 
                                                                InvalidArgumentException
                                                                                         
        If $policy->limitation is empty (null, empty string/array..) 
Update role (draft).
    
    Parameters
    
                    
            
    Update the user information specified by the user token struct.
    
    Parameters