Bitrix Site Manager

CGroup::GetByID

CDBResult
CGroup::GetByID(
 int id,
 string get_users_amount = "N"
)

The method GetByID returns the user group by its ID as an instance of CDBResult class.

Parameters

ParameterDescription
id Group ID.
get_users_amount If set to "Y", the selection will include the field "USERS" containing the number of users in the group; if set to "N", the selection will not include such field (default behaviour).

See Also

Example



<?
$rsGroup = CGroup::GetByID(2, "Y");
$arGroup = $rsGroup->Fetch();
echo "<pre>"; print_r($arGroup); echo "</pre>";
?>