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

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

		return false;
	}

	if ($this->isNetwork())
	{
		return true;
	}

	return true;
}