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