IUserManager¶
-
interface
OCP\
IUserManager
¶ - Class ManagerHooks 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)
Implemented by: OC\User\Manager
Source: lib/public/IUserManager.php#49
Methods¶
-
public
OCP\IUserManager::
registerBackend
($backend)¶ - register a user backend
Source: Parameters: - $backend (
OCP\UserInterface
)
Since: 8.0.0
- $backend (
-
public
OCP\IUserManager::
getBackends
()¶ - Get the active backends
Source: lib/public/IUserManager.php#63 Returns: \OCP\UserInterface[]
Since: 8.0.0
-
public
OCP\IUserManager::
removeBackend
($backend)¶ - remove a user backend
Source: Parameters: - $backend (
OCP\UserInterface
)
Since: 8.0.0
- $backend (
-
public
OCP\IUserManager::
clearBackends
()¶ - remove all user backends
Source: lib/public/IUserManager.php#77 Since: 8.0.0
-
public
OCP\IUserManager::
get
($uid)¶ - get a user by user id
Source: Parameters: - $uid (string)
Returns: \OCP\IUser
| null Either the user or null if the specified user does not existSince: 8.0.0
-
public
OCP\IUserManager::
userExists
($uid)¶ - check if a user exists
Source: Parameters: - $uid (string)
Returns: bool
Since: 8.0.0
-
public
OCP\IUserManager::
checkPassword
($loginName, $password)¶ - Check if the password is valid for the user
Source: Parameters: - $loginName (string)
- $password (string)
Returns: mixed the User object on success, false otherwise
Since: 8.0.0
-
public
OCP\IUserManager::
search
($pattern, $limit=null, $offset=null)¶ - search by user id
Source: Parameters: - $pattern (string)
- $limit (int)
- $offset (int)
Returns: Since: 8.0.0
-
public
OCP\IUserManager::
searchDisplayName
($pattern, $limit=null, $offset=null)¶ - search by displayName
Source: Parameters: - $pattern (string)
- $limit (int)
- $offset (int)
Returns: Since: 8.0.0
-
public
OCP\IUserManager::
searchKnownUsersByDisplayName
($searcher, $pattern, $limit=null, $offset=null)¶ - Search known users (from phonebook sync) by displayName
Source: Parameters: - $searcher (string)
- $pattern (string)
- $limit (int | null)
- $offset (int | null)
Returns: Since: 21.0.1
-
public
OCP\IUserManager::
createUser
($uid, $password)¶ Source: Parameters: - $uid (string)
- $password (string)
Throws: \InvalidArgumentException
Returns: bool |
\OCP\IUser
the created user or falseSince: 8.0.0
-
public
OCP\IUserManager::
createUserFromBackend
($uid, $password, $backend)¶ Source: Parameters: - $uid (string)
- $password (string)
- $backend (
OCP\UserInterface
)
Returns: \OCP\IUser
| nullThrows: \InvalidArgumentException
Since: 12.0.0
-
public
OCP\IUserManager::
countUsers
()¶ - returns how many users per backend exist (if supported by backend)
Source: lib/public/IUserManager.php#166 Returns: array an array of backend class as key and count number as value Since: 8.0.0
-
public
OCP\IUserManager::
callForAllUsers
($callback, $search="")¶ Source: Parameters: - $callback (
Closure
) - $search (string)
Since: 9.0.0
- $callback (
-
public
OCP\IUserManager::
countDisabledUsers
()¶ - returns how many users have logged in once
Source: lib/public/IUserManager.php#182 Returns: int Since: 11.0.0
-
public
OCP\IUserManager::
countSeenUsers
()¶ - returns how many users have logged in once
Source: lib/public/IUserManager.php#190 Returns: int Since: 11.0.0
-
public
OCP\IUserManager::
callForSeenUsers
($callback)¶ Source: Parameters: - $callback (
Closure
)
Since: 11.0.0
- $callback (
-
public
OCP\IUserManager::
getByEmail
($email)¶ Source: Parameters: - $email (string)
Returns: Since: 9.1.0