• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/placement.php
  • Класс: BitrixRestPlacementTable
  • Вызов: PlacementTable::getUserFilter
static function getUserFilter($userId)
{
	if (is_null($userId))
	{
		global $USER;
		if ($USER instanceof CUser)
		{
			$userId = (int)$USER->getId();
		}
	}

	if ($userId > 0)
	{
		$result = [
			static::DEFAULT_USER_ID_VALUE,
			$userId,
		];
	}
	else
	{
		$result = static::DEFAULT_USER_ID_VALUE;
	}

	return $result;
}