Documentation

GetByID

array
CSocNetGroup::GetByID(
 int ID,
 bool bCheckPermissions = false
);

The method returns workgroup parameters with set ID. Static method.

Note: when calling the method multiple times for a single workgroup ID within one hit, only one query is sent to the database. Subsequently, the result is returned without the database query.

Parameters

Parameter Description Available from version
ID Workgroup ID
ID Access permission check flag. Optional parameter. Set to false by default.

In addition to the standard field values the method processes values of all workgroup user fields.

Returned value

Returns the following array with keys as follows:
ID - workgroup ID,
SITE_ID - site ID,
NAME - group name,
DESCRIPTION - group description,
DATE_CREATE - date when created,
DATE_UPDATE - date of the last update of workgroup parameters,
ACTIVE - active status,
VISIBLE - group visibility in lists,
OPENED - defines if the group is open for user joining,
CLOSED - archive group status,
SUBJECT_ID - group topic ID,
OWNER_ID - group owner ID,
KEYWORDS - keywords,
IMAGE_ID - icon ID,
NUMBER_OF_MEMBERS - number of group members,
INITIATE_PERMS - who has permissions to accept new members into a group,
SPAM_PERMS - who has permissions messages to group members,
DATE_ACTIVITY - date of the last activity in group,
SUBJECT_NAME - group topic name.

See Also

Examples

<?
$arGroup = CSocNetGroup::GetByID(5);
print_r($arGroup);
?>


© «Bitrix24», 2001-2024
Up