IGroupManager

interface OCP\IGroupManager
Class Manager
Hooks available in scope \OC\Group:
- preAddUser(\OC\Group\Group $group, \OC\User\User $user)
- postAddUser(\OC\Group\Group $group, \OC\User\User $user)
- preRemoveUser(\OC\Group\Group $group, \OC\User\User $user)
- postRemoveUser(\OC\Group\Group $group, \OC\User\User $user)
- preDelete(\OC\Group\Group $group)
- postDelete(\OC\Group\Group $group)
- preCreate(string $groupId)
- postCreate(\OC\Group\Group $group)
Source:lib/public/IGroupManager.php#48

Methods

public OCP\IGroupManager::isBackendUsed($backendClass)
Checks whether a given backend is used
Source:

lib/public/IGroupManager.php#56

Parameters:
  • $backendClass (string) Full classname including complete namespace
Returns:

bool

Since:

8.1.0

public OCP\IGroupManager::addBackend($backend)
Source:

lib/public/IGroupManager.php#62

Parameters:
Since:

8.0.0

public OCP\IGroupManager::clearBackends()
Source:lib/public/IGroupManager.php#67
Since:8.0.0
public OCP\IGroupManager::getBackends()
Get the active backends
Source:lib/public/IGroupManager.php#74
Returns:\OCP\GroupInterface[]
Since:13.0.0
public OCP\IGroupManager::get($gid)
Source:

lib/public/IGroupManager.php#81

Parameters:
  • $gid (string)
Returns:

\OCP\IGroup | null

Since:

8.0.0

public OCP\IGroupManager::groupExists($gid)
Source:

lib/public/IGroupManager.php#88

Parameters:
  • $gid (string)
Returns:

bool

Since:

8.0.0

public OCP\IGroupManager::createGroup($gid)
Source:

lib/public/IGroupManager.php#95

Parameters:
  • $gid (string)
Returns:

\OCP\IGroup | null

Since:

8.0.0

public OCP\IGroupManager::search($search, $limit=null, $offset=null)
Source:

lib/public/IGroupManager.php#104

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

\OCP\IGroup[]

Since:

8.0.0

public OCP\IGroupManager::getUserGroups($user=null)
Source:

lib/public/IGroupManager.php#111

Parameters:
Returns:

\OCP\IGroup[]

Since:

8.0.0

public OCP\IGroupManager::getUserGroupIds($user)
Source:

lib/public/IGroupManager.php#118

Parameters:
Returns:

string[] with group names

Since:

8.0.0

public OCP\IGroupManager::displayNamesInGroup($gid, $search="", $limit=-1, $offset=0)
get a list of all display names in a group
Source:

lib/public/IGroupManager.php#130

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

array an array of display names (value) and user ids (key)

Since:

8.0.0

public OCP\IGroupManager::isAdmin($userId)
Checks if a userId is in the admin group
Source:

lib/public/IGroupManager.php#138

Parameters:
  • $userId (string)
Returns:

bool if admin

Since:

8.0.0

public OCP\IGroupManager::isInGroup($userId, $group)
Checks if a userId is in a group
Source:

lib/public/IGroupManager.php#147

Parameters:
  • $userId (string)
  • $group (string)
Returns:

bool if in group

Since:

8.0.0