• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Entity/User/UserExtranet.php
  • Класс: BitrixImV2EntityUserUserExtranet
  • Вызов: UserExtranet::checkAccessWithoutCaching
protected function checkAccessWithoutCaching(User $otherUser): bool
{
	if (!static::$moduleManager::isModuleInstalled('intranet'))
	{
		return $this->hasAccessBySocialNetwork($otherUser->getId());
	}

	if ($otherUser->isBot())
	{
		return true;
	}

	if ($this->isNetwork() && !$otherUser->isExtranet())
	{
		return true;
	}

	$inGroup = BitrixImIntegrationSocialnetworkExtranet::isUserInGroup($this->getId(), $otherUser->getId());
	if ($inGroup)
	{
		return true;
	}

	return false;
}