Nextcloud PHP API (stable18)

IGroup

Interface IGroup

Tags
since
8.0.0

Table of Contents

addUser()  : mixed
add a user to the group
canAddUser()  : bool
canRemoveUser()  : bool
count()  : int|bool
returns the number of users matching the search string
countDisabled()  : int|bool
returns the number of disabled users
delete()  : bool
delete the group
getDisplayName()  : string
Returns the group display name
getGID()  : string
getUsers()  : \OCP\IUser[]
get all users in the group
hideFromCollaboration()  : bool
inGroup()  : bool
check if a user is in the group
removeUser()  : mixed
remove a user from the group
searchDisplayName()  : \OCP\IUser[]
search for users in the group by displayname
searchUsers()  : \OCP\IUser[]
search for users in the group by userid
setDisplayName()  : bool
Set the group display name

Methods

addUser()

add a user to the group

public addUser(IUser $user) : mixed
Parameters
$user : IUser
Tags
since
8.0.0
Return values
mixed

canAddUser()

public canAddUser() : bool
Tags
since
14.0.0
Return values
bool

canRemoveUser()

public canRemoveUser() : bool
Tags
since
14.0.0
Return values
bool

count()

returns the number of users matching the search string

public count([string $search = '' ]) : int|bool
Parameters
$search : string = ''
Tags
since
8.0.0
Return values
int|bool

countDisabled()

returns the number of disabled users

public countDisabled() : int|bool
Tags
since
14.0.0
Return values
int|bool

delete()

delete the group

public delete() : bool
Tags
since
8.0.0
Return values
bool

getDisplayName()

Returns the group display name

public getDisplayName() : string
Tags
since
12.0.0
Return values
string

getGID()

public getGID() : string
Tags
since
8.0.0
Return values
string

getUsers()

get all users in the group

public getUsers() : \OCP\IUser[]
Tags
since
8.0.0
Return values
\OCP\IUser[]

hideFromCollaboration()

public hideFromCollaboration() : bool
Tags
since
16.0.0
Return values
bool

inGroup()

check if a user is in the group

public inGroup(IUser $user) : bool
Parameters
$user : IUser
Tags
since
8.0.0
Return values
bool

removeUser()

remove a user from the group

public removeUser(IUser $user) : mixed
Parameters
$user : IUser
Tags
since
8.0.0
Return values
mixed

searchDisplayName()

search for users in the group by displayname

public searchDisplayName(string $search[, int $limit = null ][, int $offset = null ]) : \OCP\IUser[]
Parameters
$search : string
$limit : int = null
$offset : int = null
Tags
since
8.0.0
Return values
\OCP\IUser[]

searchUsers()

search for users in the group by userid

public searchUsers(string $search[, int $limit = null ][, int $offset = null ]) : \OCP\IUser[]
Parameters
$search : string
$limit : int = null
$offset : int = null
Tags
since
8.0.0
Return values
\OCP\IUser[]

setDisplayName()

Set the group display name

public setDisplayName(string $displayName) : bool
Parameters
$displayName : string
Tags
since
18.0.0
Return values
bool

Search results