UserRepositoryInterface
            
            extends
                            HasFeature                    
                
            in
            
        
    
        
            Interface User.
Tags
Table of Contents
Methods
- approve() : Content
 - assignRole() : User
 - Add role/roles to an user.
 - banUser() : bool
 - Ban an user.
 - cancelAccount() : bool
 - cleanUpDeletedUser() : void
 - cleanUpExpiredBanData() : bool
 - Clean all expired ban data.
 - createAvatar() : void
 - createAvatarFromSignup() : void
 - createUser() : User|null
 - deleteUser() : bool
 - denyUser() : Content
 - feature() : bool
 - findAndValidateForAuth() : User|null
 - Find an user for authentication.
 - findUserByEmail() : User|null
 - Find an user by email.
 - findUserByEmailOrPhoneNumber() : User|null
 - Find an user by email or phone.
 - getAdminAndStaffOptions() : array<int, mixed>
 - getBan() : UserBan|null
 - Get ban data of an user.
 - getInvisibleSettings() : array<string, mixed>
 - getItemExtraStatistics() : array<string, mixed>
 - getOnlineUserCount() : int
 - getOnlineUserCount.
 - getPendingUserCount() : int
 - getPendingUserCount.
 - getSuperAdmin() : User|null
 - getUserByRoleId() : User
 - getUsersByRoleId() : Collection|null
 - getVerifyBy() : string|null
 - getVerifyMessage() : string|null
 - isBanned() : bool
 - Check is banned.
 - isFeature() : bool
 - removeBanUser() : bool
 - Remove user from ban.
 - removeCover() : bool
 - removeRole() : User
 - Remove an user role.
 - searchBlockUser() : mixed
 - update() : User
 - updateAvatar() : array<string, mixed>
 - updateCover() : array<string, mixed>
 - updateThemePreference() : void
 - Update user profile config which being stored in User value table.
 - updateUser() : User
 - updateVideosSettings() : User
 - uploadAvatar() : array<string, mixed>
 - validateStatuses() : void
 - validate if user account is accessible return an array that contains the validation error, null if passed.
 - validateVerifiedBy() : void
 - viewUser() : User
 - View a user.
 - viewUsers() : Paginator
 - Browse users.
 
Methods
approve()
    public
                    approve(User $context, int $id) : Content
    Parameters
- $context : User
 - $id : int
 
Return values
ContentassignRole()
Add role/roles to an user.
    public
                    assignRole(int $userId, array<string|int, mixed>|array<string|int, Role>|string $roles) : User
    Parameters
- $userId : int
 - $roles : array<string|int, mixed>|array<string|int, Role>|string
 
Tags
Return values
UserbanUser()
Ban an user.
    public
                    banUser(User $user, User $owner[, int $day = 0 ][, int $returnUserGroup = UserRole::NORMAL_USER_ID ][, string|null $reason = null ]) : bool
    Parameters
- $user : User
 - $owner : User
 - $day : int = 0
 - $returnUserGroup : int = UserRole::NORMAL_USER_ID
 - $reason : string|null = null
 
Tags
Return values
boolcancelAccount()
    public
                    cancelAccount(User $context, int $id, array<string, mixed> $params) : bool
    Parameters
- $context : User
 - $id : int
 - $params : array<string, mixed>
 
Return values
boolcleanUpDeletedUser()
    public
                    cleanUpDeletedUser([int $period = 1 ]) : void
    Parameters
- $period : int = 1
 - 
                    
Users are deleted after this period of days shall be applicable
 
cleanUpExpiredBanData()
Clean all expired ban data.
    public
                    cleanUpExpiredBanData() : bool
    Return values
boolcreateAvatar()
    public
                    createAvatar(User $context, UploadedFile $image, array<string, mixed> $params) : void
    Parameters
- $context : User
 - $image : UploadedFile
 - $params : array<string, mixed>
 
createAvatarFromSignup()
    public
                    createAvatarFromSignup(User $context, UploadedFile $image, array<string, mixed> $params) : void
    Parameters
- $context : User
 - $image : UploadedFile
 - $params : array<string, mixed>
 
createUser()
    public
                    createUser(array<string, mixed> $attributes) : User|null
    Parameters
- $attributes : array<string, mixed>
 
Return values
User|nulldeleteUser()
    public
                    deleteUser(User $context, int $id) : bool
    Parameters
- $context : User
 - $id : int
 
Tags
Return values
booldenyUser()
    public
                    denyUser(User $context, int $id, array<string|int, mixed> $attributes) : Content
    Parameters
- $context : User
 - $id : int
 - $attributes : array<string|int, mixed>
 
Return values
Contentfeature()
    public
                    feature(User $context, int $id, int $feature) : bool
    Parameters
- $context : User
 - $id : int
 - $feature : int
 
Return values
boolfindAndValidateForAuth()
Find an user for authentication.
    public
                    findAndValidateForAuth(string $username, string $password) : User|null
    Parameters
- $username : string
 - $password : string
 
Return values
User|nullfindUserByEmail()
Find an user by email.
    public
                    findUserByEmail(string $email) : User|null
    Parameters
- $email : string
 
Return values
User|nullfindUserByEmailOrPhoneNumber()
Find an user by email or phone.
    public
                    findUserByEmailOrPhoneNumber(string $value) : User|null
    Parameters
- $value : string
 
Return values
User|nullgetAdminAndStaffOptions()
    public
                    getAdminAndStaffOptions() : array<int, mixed>
    Return values
array<int, mixed>getBan()
Get ban data of an user.
    public
                    getBan(int $userId) : UserBan|null
    Parameters
- $userId : int
 
Return values
UserBan|nullgetInvisibleSettings()
    public
                    getInvisibleSettings(User $context) : array<string, mixed>
    Parameters
- $context : User
 
Return values
array<string, mixed>getItemExtraStatistics()
    public
                    getItemExtraStatistics(User $context, User $user, string $itemType, int $itemId) : array<string, mixed>
    Parameters
Return values
array<string, mixed>getOnlineUserCount()
getOnlineUserCount.
    public
                    getOnlineUserCount() : int
    Return values
intgetPendingUserCount()
getPendingUserCount.
    public
                    getPendingUserCount() : int
    Return values
intgetSuperAdmin()
    public
                    getSuperAdmin() : User|null
    Return values
User|nullgetUserByRoleId()
    public
                    getUserByRoleId(int $roleId) : User
    Parameters
- $roleId : int
 
Return values
UsergetUsersByRoleId()
    public
                    getUsersByRoleId(int $roleId) : Collection|null
    Parameters
- $roleId : int
 
Return values
Collection|nullgetVerifyBy()
    public
                    getVerifyBy(User $user, string $value) : string|null
    Parameters
- $user : User
 - $value : string
 
Return values
string|nullgetVerifyMessage()
    public
                    getVerifyMessage(string|null $email, string|null $phoneNumber, array<string|int, mixed> $params) : string|null
    Parameters
- $email : string|null
 - $phoneNumber : string|null
 - $params : array<string|int, mixed>
 
Return values
string|nullisBanned()
Check is banned.
    public
                    isBanned(int $userId) : bool
    Parameters
- $userId : int
 
Return values
boolisFeature()
    public
                    isFeature(Content $model) : bool
    Parameters
- $model : Content
 
Return values
boolremoveBanUser()
Remove user from ban.
    public
                    removeBanUser(User $user, User $owner) : bool
    Parameters
Tags
Return values
boolremoveCover()
    public
                    removeCover(User $context, int $id) : bool
    Parameters
- $context : User
 - $id : int
 
Tags
Return values
boolremoveRole()
Remove an user role.
    public
                    removeRole(int $userId, Role|string $role) : User
    Parameters
- $userId : int
 - $role : Role|string
 
Tags
Return values
UsersearchBlockUser()
    public
                    searchBlockUser(User $user, string $search) : mixed
    Parameters
- $user : User
 - $search : string
 
update()
    public
                    update(array<string|int, mixed> $attributes, mixed $id) : User
    Parameters
- $attributes : array<string|int, mixed>
 - $id : mixed
 
Return values
UserupdateAvatar()
    public
                    updateAvatar(User $context, User $owner, array<string, mixed> $attribute) : array<string, mixed>
    Parameters
Tags
Return values
array<string, mixed>updateCover()
    public
                    updateCover(User $context, User $owner, array<string, mixed> $attributes) : array<string, mixed>
    Parameters
Tags
Return values
array<string, mixed>updateThemePreference()
Update user profile config which being stored in User value table.
    public
                    updateThemePreference(User $user[, array<string, mixed> $attributes = [] ]) : void
    Parameters
- $user : User
 - $attributes : array<string, mixed> = []
 
updateUser()
    public
                    updateUser(User $context, int $id, array<string, mixed> $attributes) : User
    Parameters
- $context : User
 - $id : int
 - $attributes : array<string, mixed>
 
Return values
UserupdateVideosSettings()
    public
                    updateVideosSettings(User $context, User $user, array<string, mixed> $attributes) : User
    Parameters
Return values
UseruploadAvatar()
    public
                    uploadAvatar(User $context, User $owner, array<string, mixed> $attributes) : array<string, mixed>
    Parameters
Tags
Return values
array<string, mixed>validateStatuses()
validate if user account is accessible return an array that contains the validation error, null if passed.
    public
                    validateStatuses(User $user) : void
    Parameters
- $user : User
 
Tags
validateVerifiedBy()
    public
                    validateVerifiedBy(User $user, string $verifyBy) : void
    Parameters
- $user : User
 - $verifyBy : string
 
Tags
viewUser()
View a user.
    public
                    viewUser(User $context, int $id) : User
    Parameters
- $context : User
 - $id : int
 
Tags
Return values
UserviewUsers()
Browse users.
    public
                    viewUsers(User $context, array<string, mixed> $attributes) : Paginator
    Parameters
- $context : User
 - $attributes : array<string, mixed>