• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/timeline/factorybasedcontroller.php
  • Класс: Bitrix\Crm\Timeline\FactoryBasedController
  • Вызов: FactoryBasedController::resolveAuthorId
protected function resolveAuthorId(array $fields): int
{
	$authorFieldNames = [
		// field names here are sorted by priority. First not empty value returned
		Item::FIELD_NAME_UPDATED_BY,
		Item::FIELD_NAME_CREATED_BY,
		Item::FIELD_NAME_ASSIGNED,
	];

	foreach ($authorFieldNames as $fieldName)
	{
		if (isset($fields[$fieldName]) && ($fields[$fieldName] > 0))
		{
			return (int)$fields[$fieldName];
		}
	}

	return static::getDefaultAuthorId();
}