IGroupManager
in
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
Methods
- addBackend() : mixed
- clearBackends() : mixed
- createGroup() : IGroup|null
- displayNamesInGroup() : array<string|int, mixed>
- get a list of all display names in a group
- get() : IGroup|null
- getBackends() : array<string|int, GroupInterface>
- Get the active backends
- getDisplayName() : string|null
- Get the display name of a Nextcloud group
- getUserGroupIds() : array<string|int, string>
- getUserGroups() : array<string|int, IGroup>
- groupExists() : bool
- isAdmin() : bool
- Checks if a userId is in the admin group
- isBackendUsed() : bool
- Checks whether a given backend is used
- isDelegatedAdmin() : bool
- Checks if a userId is eligible to users administration delegation
- isInGroup() : bool
- Checks if a userId is in a group
- search() : array<string|int, IGroup>
Methods
addBackend()
public
addBackend(GroupInterface $backend) : mixed
Parameters
- $backend : GroupInterface
Tags
clearBackends()
public
clearBackends() : mixed
Tags
createGroup()
public
createGroup(string $gid) : IGroup|null
Parameters
- $gid : string
Tags
Return values
IGroup|nulldisplayNamesInGroup()
get a list of all display names in a group
public
displayNamesInGroup(string $gid[, string $search = '' ][, int $limit = -1 ][, int $offset = 0 ]) : array<string|int, mixed>
Parameters
- $gid : string
- $search : string = ''
- $limit : int = -1
- $offset : int = 0
Tags
Return values
array<string|int, mixed> —an array of display names (value) and user ids (key)
get()
public
get(string $gid) : IGroup|null
Parameters
- $gid : string
Tags
Return values
IGroup|nullgetBackends()
Get the active backends
public
getBackends() : array<string|int, GroupInterface>
Tags
Return values
array<string|int, GroupInterface>getDisplayName()
Get the display name of a Nextcloud group
public
getDisplayName(string $groupId) : string|null
Parameters
- $groupId : string
Tags
Return values
string|null —display name, if any
getUserGroupIds()
public
getUserGroupIds(IUser $user) : array<string|int, string>
Parameters
- $user : IUser
Tags
Return values
array<string|int, string> —with group names
getUserGroups()
public
getUserGroups([IUser|null $user = null ]) : array<string|int, IGroup>
Parameters
- $user : IUser|null = null
Tags
Return values
array<string|int, IGroup>groupExists()
public
groupExists(string $gid) : bool
Parameters
- $gid : string
Tags
Return values
boolisAdmin()
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
boolisDelegatedAdmin()
Checks if a userId is eligible to users administration delegation
public
isDelegatedAdmin(string $userId) : bool
Parameters
- $userId : string
Tags
Return values
bool —if delegated admin
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|null $limit = null ][, int|null $offset = 0 ]) : array<string|int, IGroup>
Parameters
- $search : string
- $limit : int|null = null
- $offset : int|null = 0