• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/classes/general/utils.php
  • Класс: CIntranetUtils
  • Вызов: CIntranetUtils::getDepartmentColleagues
static function getDepartmentColleagues($USER_ID = null, $bRecursive = false, $bSkipSelf = false, $onlyActive = 'Y', $arSelect = null)
{
	global $USER;

	if (!$USER_ID)
		$USER_ID = $USER->GetID();

	$dbRes = CUser::GetList('ID', 'ASC', array('ID' => $USER_ID), array('SELECT' => array('UF_DEPARTMENT')));
	if (($arRes = $dbRes->Fetch()) && is_array($arRes['UF_DEPARTMENT']) && count($arRes['UF_DEPARTMENT']) > 0)
	{
		return CIntranetUtils::getDepartmentEmployees($arRes['UF_DEPARTMENT'], $bRecursive, $bSkipSelf, $onlyActive, $arSelect);
	}

	return new CDBResult();
}