• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat.php
  • Класс: Bitrix\Im\V2\Chat
  • Вызов: Chat::hasAccess
public function hasAccess($user = null): bool
{
	$userId = $this->getUserId($user);

	if (isset($this->accessCache[$userId]))
	{
		return $this->accessCache[$userId];
	}

	if (!$userId || !$this->getChatId())
	{
		$this->accessCache[$userId] = false;

		return false;
	}

	$this->accessCache[$userId] = $this->checkAccessWithoutCaching($userId);

	return $this->accessCache[$userId];
}