• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/classes/general/report_helper.php
  • Класс: CReportHelper
  • Вызов: CReportHelper::detectUserField
static function detectUserField($field)
{
	static::prepareUFInfo();

	$arUF = array(
		'isUF' => false,
		'ufInfo' => null
	);

	if ($field instanceof BitrixMainEntityExpressionField && is_array(self::$ufInfo) && count(self::$ufInfo) > 0)
	{
		$ufKey = $field->getName();
		$ufId = $field->getEntity()->getUFId();
		if (is_string($ufId) && !empty($ufId) && array_key_exists($ufId, self::$ufInfo)
			&& is_array(self::$ufInfo[$ufId])
			&& array_key_exists($ufKey, self::$ufInfo[$ufId]))
		{
			$arUF['isUF'] = true;
			$arUF['ufInfo'] = self::$ufInfo[$ufId][$ufKey];
		}
	}

	return $arUF;
}