IUserManager
Class Manager
Hooks available in scope \OC\User:
- preSetPassword(\OC\User\User $user, string $password, string $recoverPassword)
- postSetPassword(\OC\User\User $user, string $password, string $recoverPassword)
- preDelete(\OC\User\User $user)
- postDelete(\OC\User\User $user)
- preCreateUser(string $uid, string $password)
- postCreateUser(\OC\User\User $user, string $password)
- assignedUserId(string $uid)
- preUnassignedUserId(string $uid)
- postUnassignedUserId(string $uid)
Tags
Table of Contents
- callForAllUsers() : mixed
- callForSeenUsers() : mixed
- checkPassword() : mixed
- Check if the password is valid for the user
- clearBackends() : mixed
- remove all user backends
- countDisabledUsers() : int
- returns how many users have logged in once
- countSeenUsers() : int
- returns how many users have logged in once
- countUsers() : array
- returns how many users per backend exist (if supported by backend)
- createUser() : bool|IUser
- createUserFromBackend() : IUser|null
- get() : IUser|null
- get a user by user id
- getBackends() : \OCP\UserInterface[]
- Get the active backends
- getByEmail() : \OCP\IUser[]
- registerBackend() : mixed
- register a user backend
- removeBackend() : mixed
- remove a user backend
- search() : \OCP\IUser[]
- search by user id
- searchDisplayName() : \OCP\IUser[]
- search by displayName
- userExists() : bool
- check if a user exists
Methods
callForAllUsers()
public
callForAllUsers(Closure $callback[, string $search = '' ]) : mixed
Parameters
- $callback : Closure
- $search : string = ''
Tags
Return values
mixed —callForSeenUsers()
public
callForSeenUsers(Closure $callback) : mixed
Parameters
- $callback : Closure
Tags
Return values
mixed —checkPassword()
Check if the password is valid for the user
public
checkPassword(string $loginName, string $password) : mixed
Parameters
- $loginName : string
- $password : string
Tags
Return values
mixed —the User object on success, false otherwise
clearBackends()
remove all user backends
public
clearBackends() : mixed
Tags
Return values
mixed —countDisabledUsers()
returns how many users have logged in once
public
countDisabledUsers() : int
Tags
Return values
int —countSeenUsers()
returns how many users have logged in once
public
countSeenUsers() : int
Tags
Return values
int —countUsers()
returns how many users per backend exist (if supported by backend)
public
countUsers() : array
Tags
Return values
array —an array of backend class as key and count number as value
createUser()
public
createUser(string $uid, string $password) : bool|IUser
Parameters
- $uid : string
- $password : string
Tags
Return values
bool|IUser —the created user or false
createUserFromBackend()
public
createUserFromBackend(string $uid, string $password, UserInterface $backend) : IUser|null
Parameters
- $uid : string
- $password : string
- $backend : UserInterface
Tags
Return values
IUser|null —get()
get a user by user id
public
get(string $uid) : IUser|null
Parameters
- $uid : string
Tags
Return values
IUser|null —Either the user or null if the specified user does not exist
getBackends()
Get the active backends
public
getBackends() : \OCP\UserInterface[]
Tags
Return values
\OCP\UserInterface[] —getByEmail()
public
getByEmail(string $email) : \OCP\IUser[]
Parameters
- $email : string
Tags
Return values
\OCP\IUser[] —registerBackend()
register a user backend
public
registerBackend(UserInterface $backend) : mixed
Parameters
- $backend : UserInterface
Tags
Return values
mixed —removeBackend()
remove a user backend
public
removeBackend(UserInterface $backend) : mixed
Parameters
- $backend : UserInterface
Tags
Return values
mixed —search()
search by user id
public
search(string $pattern[, int $limit = null ][, int $offset = null ]) : \OCP\IUser[]
Parameters
- $pattern : string
- $limit : int = null
- $offset : int = null
Tags
Return values
\OCP\IUser[] —searchDisplayName()
search by displayName
public
searchDisplayName(string $pattern[, int $limit = null ][, int $offset = null ]) : \OCP\IUser[]
Parameters
- $pattern : string
- $limit : int = null
- $offset : int = null
Tags
Return values
\OCP\IUser[] —userExists()
check if a user exists
public
userExists(string $uid) : bool
Parameters
- $uid : string