CCrmUserType::GetUserFields

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmUserType
  4. GetUserFields
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_usertype.php
  • Класс: \CCrmUserType
  • Вызов: CCrmUserType::GetUserFields
protected function GetUserFields($entity_id, $value_id = 0, $LANG = false, $user_id = false)
{
	$result = $this->cUFM->GetUserFields($entity_id, $value_id, $LANG, $user_id);

	$isReread = false;
	if($this->isMyCompany())
	{
		$obUserType = false;
		foreach(CCrmCompany::getMyCompanyAdditionalUserFields() as $ufieldName => $description)
		{
			if(!isset($result[$ufieldName]))
			{
				if(!$obUserType)
				{
					$obUserType = new \CUserTypeEntity();
				}
				$obUserType->Add($description);
				$isReread = true;
			}
		}
	}

	if($isReread)
	{
		$result = $this->cUFM->GetUserFields($entity_id, $value_id, $LANG, $user_id);
	}

	$result = $this->postFilterFields($result);
	$result = $this->postFilterAccessCheck($result, $user_id);

	return $result;
}

Добавить комментарий