Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
UserExtranet.php
1<?php
2
4
5class UserExtranet extends User
6{
7 protected function checkAccessWithoutCaching(User $otherUser): bool
8 {
9 if (!static::$moduleManager::isModuleInstalled('intranet'))
10 {
11 return $this->hasAccessBySocialNetwork($otherUser->getId());
12 }
13
14 if ($otherUser->isBot())
15 {
16 return true;
17 }
18
19 if ($this->isNetwork() && !$otherUser->isExtranet())
20 {
21 return true;
22 }
23
24 $inGroup = \Bitrix\Im\Integration\Socialnetwork\Extranet::isUserInGroup($this->getId(), $otherUser->getId());
25 if ($inGroup)
26 {
27 return true;
28 }
29
30 return false;
31 }
32}
hasAccessBySocialNetwork(int $idOtherUser)
Definition User.php:230