GroupInterface
in
TODO actually this is a IGroupBackend
Tags
Table of Contents
Constants
- ADD_TO_GROUP = 0x100
- COUNT_USERS = 0x100000
- CREATE_GROUP = 0x1
- actions that user backends can define
- DELETE_GROUP = 0x10
- GROUP_DETAILS = 0x1000000
- IS_ADMIN = 0x10000000
- REMOVE_FROM_GOUP = 0x1000
- REMOVE_FROM_GROUP = 0x1000
Methods
- getGroups() : array<string|int, mixed>
- getUserGroups() : array<int, string>
- Get all groups a user belongs to
- groupExists() : bool
- implementsActions() : bool
- Check if backend implements actions
- inGroup() : bool
- is user in group?
- usersInGroup() : array<int, string>
Constants
ADD_TO_GROUP
public
mixed
ADD_TO_GROUP
= 0x100
Tags
COUNT_USERS
public
mixed
COUNT_USERS
= 0x100000
Tags
CREATE_GROUP
actions that user backends can define
public
mixed
CREATE_GROUP
= 0x1
Tags
DELETE_GROUP
public
mixed
DELETE_GROUP
= 0x10
Tags
GROUP_DETAILS
public
mixed
GROUP_DETAILS
= 0x1000000
Tags
IS_ADMIN
public
mixed
IS_ADMIN
= 0x10000000
Tags
REMOVE_FROM_GOUP
public
mixed
REMOVE_FROM_GOUP
= 0x1000
Tags
REMOVE_FROM_GROUP
public
mixed
REMOVE_FROM_GROUP
= 0x1000
Tags
Methods
getGroups()
public
getGroups([string $search = '' ][, int $limit = -1 ][, int $offset = 0 ]) : array<string|int, mixed>
Parameters
- $search : string = ''
- $limit : int = -1
- $offset : int = 0
Tags
Return values
array<string|int, mixed> —an array of group names
getUserGroups()
Get all groups a user belongs to
public
getUserGroups(string $uid) : array<int, string>
Parameters
- $uid : string
-
Name of the user
Tags
Return values
array<int, string> —an array of group names
groupExists()
public
groupExists(string $gid) : bool
Parameters
- $gid : string
Tags
Return values
boolimplementsActions()
Check if backend implements actions
public
implementsActions(int $actions) : bool
Parameters
- $actions : int
-
bitwise-or'ed actions
Tags
Return values
boolinGroup()
is user in group?
public
inGroup(string $uid, string $gid) : bool
Parameters
- $uid : string
-
uid of the user
- $gid : string
-
gid of the group
Tags
Return values
boolusersInGroup()
public
usersInGroup(string $gid[, string $search = '' ][, int $limit = -1 ][, int $offset = 0 ]) : array<int, string>
Use searchInGroup instead, for performance reasons
Parameters
- $gid : string
- $search : string = ''
- $limit : int = -1
- $offset : int = 0
Tags
Return values
array<int, string> —an array of user ids