Backend

class OC\Group\Backend
Abstract base class for user management
Source:lib/private/Group/Backend.php#31
Implements:OCP\GroupInterface

Constants

NOT_IMPLEMENTED = -501
error code for functions not provided by the group backend
Source:lib/private/Group/Backend.php#35

Properties

protected static property OC\Group\Backend::$possibleActions
Source:lib/private/Group/Backend.php#37

Methods

public OC\Group\Backend::getSupportedActions()
Get all supported actions
Source:

lib/private/Group/Backend.php#54

Returns:

int bitwise-or’ed actions

Returns the supported actions as int to be compared with \OC\Group\Backend::CREATE_GROUP etc.

public OC\Group\Backend::implementsActions($actions)
Check if backend implements actions
Source:

lib/private/Group/Backend.php#73

Parameters:
  • $actions (int) bitwise-or’ed actions
Returns:

bool Returns the supported actions as int to be compared with \OC\Group\Backend::CREATE_GROUP etc.

public OC\Group\Backend::inGroup($uid, $gid)
is user in group?
Source:

lib/private/Group/Backend.php#85

Parameters:
  • $uid (string) uid of the user
  • $gid (string) gid of the group
Returns:

bool Checks whether the user is member of a group or not.

public OC\Group\Backend::getUserGroups($uid)
Get all groups a user belongs to
Source:

lib/private/Group/Backend.php#97

Parameters:
  • $uid (string) Name of the user
Returns:

array an array of group names

This function fetches all groups a user belongs to. It does not check if the user exists at all.

public OC\Group\Backend::getGroups($search="", $limit=-1, $offset=0)
get a list of all groups
Source:

lib/private/Group/Backend.php#111

Parameters:
  • $search (string)
  • $limit (int)
  • $offset (int)
Returns:

array an array of group names

Returns a list with all groups

public OC\Group\Backend::groupExists($gid)
check if a group exists
Source:

lib/private/Group/Backend.php#120

Parameters:
  • $gid (string)
Returns:

bool

public OC\Group\Backend::usersInGroup($gid, $search="", $limit=-1, $offset=0)
get a list of all users in a group
Source:

lib/private/Group/Backend.php#132

Parameters:
  • $gid (string)
  • $search (string)
  • $limit (int)
  • $offset (int)
Returns:

array an array of user ids