• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/provider/taskprovider.php
  • Класс: BitrixTasksProviderTaskProvider
  • Вызов: TaskProvider::setUserId
private function setUserId(): void
{
	$this->executorId = (int) User::getId();
	if (
		is_array($this->arParams)
		&& array_key_exists('USER_ID', $this->arParams)
		&& ($this->arParams['USER_ID'] > 0)
	)
	{
		$this->executorId = (int) $this->arParams['USER_ID'];
	}

	$this->userId = $this->executorId;
	if (
		is_array($this->arParams)
		&& array_key_exists('TARGET_USER_ID', $this->arParams)
		&& ($this->arParams['TARGET_USER_ID'] > 0)
	)
	{
		$this->userId = (int) $this->arParams['TARGET_USER_ID'];
	}

	if ($this->userId && !$this->executorId)
	{
		$this->executorId = $this->userId;
	}

	if ($this->executorId && !$this->userId)
	{
		$this->userId = $this->executorId;
	}
}