• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/service/user.php
  • Класс: BitrixBizprocServiceUser
  • Вызов: User::getDepartmentHead
public function getDepartmentHead(int $departmentId): ?int
{
	if (!$this->canUseIblockApi())
	{
		return null;
	}

	$departmentIblockId = $this->getDepartmentIblockId();
	$sectionResult = CIBlockSection::GetList(
		[],
		['IBLOCK_ID' => $departmentIblockId, 'ID' => $departmentId],
		false,
		['ID', 'UF_HEAD']
	);
	$section = $sectionResult->fetch();

	return $section ? (int) $section['UF_HEAD'] : null;
}