CBPVirtualDocument :: GetUsersFromUserGroup: Bitrix method

      
<?php 
//  CBPVirtualDocument :: GetUsersFromUserGroup()
//  /dist/bitrix/modules/bizproc/classes/general/virtualdocument.php:2041

    
public function GetUsersFromUserGroup($group$documentId)
    {
        
$group strtolower($group);
        if (
$group == "author")
        {
            
$documentId intval($documentId);
            if (
$documentId <= 0)
                return array();

            
$db CIBlockElement::GetList(array(), array("ID" => $documentId"SHOW_NEW"=>"Y"), falsefalse, array("ID""IBLOCK_ID""CREATED_BY"));
            if (
$ar $db->Fetch())
                return array(
$ar["CREATED_BY"]);

            return array();
        }

        if ((string)
intval($group) !== (string)$group)
            return array();

        
$group = (int)$group;
        if (
$group <= 0)
            return array();

        
$arResult = array();

        
$dbUsersList CUser::GetList(
            (
$b "ID"),
            (
$o "ASC"),
            [
'GROUPS_ID' => $group'ACTIVE' => 'Y''IS_REAL_USER' => true],
            [
'FIELDS' => ['ID']]
        );
        while (
$arUser $dbUsersList->Fetch())
        {
            
$arResult[] = $arUser["ID"];
        }
        return 
$arResult;
    }