Group

class OC\Group\Group
Source:lib/private/Group/Group.php#48
Implements:OCP\IGroup

Properties

protected static property OC\Group\Group::$displayName
Source:lib/private/Group/Group.php#50
Type:null | string

Methods

public OC\Group\Group::__construct($gid, $backends, $dispatcher, $userManager, $emitter=null, $displayName=null)
Source:

lib/private/Group/Group.php#79

Parameters:
public OC\Group\Group::getGID()
Source:lib/private/Group/Group.php#88
public OC\Group\Group::getDisplayName()
Source:lib/private/Group/Group.php#92
public OC\Group\Group::setDisplayName($displayName)
Source:lib/private/Group/Group.php#108
public OC\Group\Group::getUsers()
get all users in the group
Source:lib/private/Group/Group.php#127
Returns:\OC\User\User[]
public OC\Group\Group::inGroup($user)
check if a user is in the group
Source:

lib/private/Group/Group.php#154

Parameters:
Returns:

bool

public OC\Group\Group::addUser($user)
add a user to the group
Source:

lib/private/Group/Group.php#172

Parameters:
public OC\Group\Group::removeUser($user)
remove a user from the group
Source:

lib/private/Group/Group.php#208

Parameters:
public OC\Group\Group::searchUsers($search, $limit=null, $offset=null)
search for users in the group by userid
Source:

lib/private/Group/Group.php#248

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

\OC\User\User[]

public OC\Group\Group::count($search="")
returns the number of users matching the search string
Source:

lib/private/Group/Group.php#266

Parameters:
  • $search (string)
Returns:

int | bool

public OC\Group\Group::countDisabled()
returns the number of disabled users
Source:lib/private/Group/Group.php#286
Returns:int | bool
public OC\Group\Group::searchDisplayName($search, $limit=null, $offset=null)
search for users in the group by displayname
Source:

lib/private/Group/Group.php#309

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

\OC\User\User[]

public OC\Group\Group::getBackendNames()
Get the names of the backend classes the group is connected to
Source:lib/private/Group/Group.php#326
Returns:string[]
public OC\Group\Group::delete()
delete the group
Source:lib/private/Group/Group.php#344
Returns:bool
public OC\Group\Group::canRemoveUser()
Source:lib/private/Group/Group.php#393
Returns:bool
Since:14.0.0
public OC\Group\Group::canAddUser()
Source:lib/private/Group/Group.php#406
Returns:bool
Since:14.0.0
public OC\Group\Group::hideFromCollaboration()
Source:lib/private/Group/Group.php#419
Returns:bool
Since:16.0.0