PHP Класс Services\UserManager

Показать файл Открыть проект

Открытые методы

Метод Описание
activateUser ( $id ) : mixed | void Activate a user
addUserToGroup ( $group_id, $user ) Add an user to an user group
createUser ( array $input = [] ) Create a new user
deactivateUser ( $id ) : mixed | void Deactivate a user
deleteUser ( $id ) : mixed | void Delete a user or multiple users
findAllUsers ( ) : mixed Find all users
findUserById ( $id, string $group_field = 'id' ) : mixed Find a user by id
getUserGroups ( SentryUser $user, string $value = null, key $key = null ) : array Get all the user groups that a user lies in
isBanned ( $id ) : boolean Check whether an user is banned or not
updateUser ( $id, array $input = [] ) : mixed | void Update an existing user
uploadImage ( File $file, integer $id = null ) : string Upload profile photo of user

Описание методов

activateUser() публичный Метод

Activate a user
public activateUser ( $id ) : mixed | void
$id User ID
Результат mixed | void

addUserToGroup() публичный Метод

Add an user to an user group
public addUserToGroup ( $group_id, $user )
$group_id
$user

createUser() публичный Метод

Create a new user
public createUser ( array $input = [] )
$input array

deactivateUser() публичный Метод

Deactivate a user
public deactivateUser ( $id ) : mixed | void
$id User ID
Результат mixed | void

deleteUser() публичный Метод

Delete a user or multiple users
public deleteUser ( $id ) : mixed | void
$id
Результат mixed | void

findAllUsers() публичный Метод

Find all users
public findAllUsers ( ) : mixed
Результат mixed

findUserById() публичный Метод

Find a user by id
public findUserById ( $id, string $group_field = 'id' ) : mixed
$id
$group_field string
Результат mixed

getUserGroups() публичный Метод

Get all the user groups that a user lies in
public getUserGroups ( SentryUser $user, string $value = null, key $key = null ) : array
$user SentryUser The user
$value string Value
$key key Key
Результат array

isBanned() публичный Метод

Check whether an user is banned or not
public isBanned ( $id ) : boolean
$id
Результат boolean

updateUser() публичный Метод

Update an existing user
public updateUser ( $id, array $input = [] ) : mixed | void
$id
$input array
Результат mixed | void

uploadImage() публичный Метод

Upload profile photo of user
public uploadImage ( File $file, integer $id = null ) : string
$file File Input file
$id integer User ID (if editing)
Результат string File Path