UserInterface

interface OCP\UserInterface
TODO actually this is a IUserBackend
Implemented by:OCP\User\Backend\ABackend OC\User\Backend
Source:lib/public/UserInterface.php#41

Methods

public OCP\UserInterface::implementsActions($actions)
Check if backend implements actions
Source:

lib/public/UserInterface.php#53

Parameters:
  • $actions (int) bitwise-or’ed actions
Returns:

bool Returns the supported actions as int to be compared with \OC\User\Backend::CREATE_USER etc.

Since:

4.5.0

Deprecated:

14.0.0 Switch to the interfaces from OCP\User\Backend

public OCP\UserInterface::deleteUser($uid)
delete a user
Source:

lib/public/UserInterface.php#61

Parameters:
  • $uid (string) The username of the user to delete
Returns:

bool

Since:

4.5.0

public OCP\UserInterface::getUsers($search="", $limit=null, $offset=null)
Get a list of all users
Source:

lib/public/UserInterface.php#72

Parameters:
  • $search (string)
  • $limit (null | int)
  • $offset (null | int)
Returns:

string[] an array of all uids

Since:

4.5.0

public OCP\UserInterface::userExists($uid)
check if a user exists
Source:

lib/public/UserInterface.php#80

Parameters:
  • $uid (string) the username
Returns:

bool

Since:

4.5.0

public OCP\UserInterface::getDisplayName($uid)
get display name of the user
Source:

lib/public/UserInterface.php#88

Parameters:
  • $uid (string) user ID of the user
Returns:

string display name

Since:

4.5.0

public OCP\UserInterface::getDisplayNames($search="", $limit=null, $offset=null)
Get a list of all display names and user ids.
Source:

lib/public/UserInterface.php#99

Parameters:
  • $search (string)
  • $limit (string | null)
  • $offset (string | null)
Returns:

array an array of all displayNames (value) and the corresponding uids (key)

Since:

4.5.0

public OCP\UserInterface::hasUserListings()
Check if a user list is available or not
Source:lib/public/UserInterface.php#106
Returns:bool if users can be listed or not
Since:4.5.0