IGroupManager¶
-
interface
OCP\
IGroupManager
¶ - Class ManagerHooks 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: Parameters: - $backendClass (string) Full classname including complete namespace
Returns: bool
Since: 8.1.0
-
public
OCP\IGroupManager::
addBackend
($backend)¶ Source: Parameters: - $backend (
OCP\GroupInterface
)
Since: 8.0.0
- $backend (
-
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: Parameters: - $gid (string)
Returns: \OCP\IGroup
| nullSince: 8.0.0
-
public
OCP\IGroupManager::
groupExists
($gid)¶ Source: Parameters: - $gid (string)
Returns: bool
Since: 8.0.0
-
public
OCP\IGroupManager::
createGroup
($gid)¶ Source: Parameters: - $gid (string)
Returns: \OCP\IGroup
| nullSince: 8.0.0
-
public
OCP\IGroupManager::
search
($search, $limit=null, $offset=null)¶ Source: Parameters: - $search (string)
- $limit (int)
- $offset (int)
Returns: Since: 8.0.0
-
public
OCP\IGroupManager::
getUserGroups
($user=null)¶ Source: Parameters: - $user (
OCP\IUser
| null)
Returns: Since: 8.0.0
- $user (
-
public
OCP\IGroupManager::
getUserGroupIds
($user)¶ Source: Parameters: - $user (
OCP\IUser
)
Returns: string[] with group names
Since: 8.0.0
- $user (
-
public
OCP\IGroupManager::
displayNamesInGroup
($gid, $search="", $limit=-1, $offset=0)¶ - get a list of all display names in a group
Source: 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: 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: Parameters: - $userId (string)
- $group (string)
Returns: bool if in group
Since: 8.0.0