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)
Tags
Table of Contents
- addBackend() : mixed
- clearBackends() : mixed
- createGroup() : IGroup|null
- displayNamesInGroup() : array
- get a list of all display names in a group
- get() : IGroup|null
- getBackends() : \OCP\GroupInterface[]
- Get the active backends
- getUserGroupIds() : array
- getUserGroups() : \OCP\IGroup[]
- groupExists() : bool
- isAdmin() : bool
- Checks if a userId is in the admin group
- isBackendUsed() : bool
- Checks whether a given backend is used
- isInGroup() : bool
- Checks if a userId is in a group
- search() : \OCP\IGroup[]
Methods
addBackend()
public
addBackend(GroupInterface $backend) : mixed
Parameters
- $backend : GroupInterface
Tags
Return values
mixed —clearBackends()
public
clearBackends() : mixed
Tags
Return values
mixed —createGroup()
public
createGroup(string $gid) : IGroup|null
Parameters
- $gid : string
Tags
Return values
IGroup|null —displayNamesInGroup()
get a list of all display names in a group
public
displayNamesInGroup(string $gid[, string $search = '' ][, int $limit = -1 ], int $offset) : array
Parameters
- $gid : string
- $search : string = ''
- $limit : int = -1
- $offset : int
Tags
Return values
array —an array of display names (value) and user ids (key)
get()
public
get(string $gid) : IGroup|null
Parameters
- $gid : string
Tags
Return values
IGroup|null —getBackends()
Get the active backends
public
getBackends() : \OCP\GroupInterface[]
Tags
Return values
\OCP\GroupInterface[] —getUserGroupIds()
public
getUserGroupIds(IUser $user) : array
Parameters
- $user : IUser
Tags
Return values
array —with group names
getUserGroups()
public
getUserGroups([IUser|null $user = null ]) : \OCP\IGroup[]
Parameters
- $user : IUser|null = null
Tags
Return values
\OCP\IGroup[] —groupExists()
public
groupExists(string $gid) : bool
Parameters
- $gid : string
Tags
Return values
bool —isAdmin()
Checks if a userId is in the admin group
public
isAdmin(string $userId) : bool
Parameters
- $userId : string
Tags
Return values
bool —if admin
isBackendUsed()
Checks whether a given backend is used
public
isBackendUsed(string $backendClass) : bool
Parameters
- $backendClass : string
-
Full classname including complete namespace
Tags
Return values
bool —isInGroup()
Checks if a userId is in a group
public
isInGroup(string $userId, string $group) : bool
Parameters
- $userId : string
- $group : string
Tags
Return values
bool —if in group
search()
public
search(string $search[, int $limit = null ][, int $offset = null ]) : \OCP\IGroup[]
Parameters
- $search : string
- $limit : int = null
- $offset : int = null