Bitrix Site Manager

CUser::GetUserGroupString

string
CUser::GetUserGroupString()

The method GetUserGroupString returns a string with comma-separated ID's of all groups containing the current authorized user (usually called from the $USER object).

Parameters

No parameters.

See Also

Example



<?
// obtain an array of groups for current user
global $USER;
$strGroups = $USER->GetUserGroupString();
echo $strGroups; // "1,2,3"
?>