• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/counter/event/event.php
  • Класс: BitrixTasksInternalsCounterEventEvent
  • Вызов: Event::getUserId
public function getUserId(): int
{
	$userId = 0;

	switch ($this->type)
	{
		case EventDictionary::EVENT_AFTER_TASK_VIEW:
		case EventDictionary::EVENT_AFTER_COMMENTS_READ_ALL:
		case EventDictionary::EVENT_AFTER_PROJECT_READ_ALL:
		case EventDictionary::EVENT_AFTER_SCRUM_READ_ALL:
		case EventDictionary::EVENT_PROJECT_USER_ADD:
		case EventDictionary::EVENT_PROJECT_USER_UPDATE:
		case EventDictionary::EVENT_PROJECT_USER_DELETE:
		case EventDictionary::EVENT_AFTER_TASK_MUTE:
		case EventDictionary::EVENT_GARBAGE_COLLECT:
			$userId = (int) $this->data['USER_ID'];
			break;
	}

	return $userId;
}