1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
UserModel.php
См. документацию.
1<?php
2
4
7
9{
10 protected ?bool $isCollaber = null;
11 protected ?bool $isExtranet = null;
12 protected ?bool $isIntranet = null;
13
14 public function isCollaber(): bool
15 {
16 if ($this->isCollaber === null)
17 {
18 $this->isCollaber = (new User($this->userId))->isCollaber();
19 }
20
21 return $this->isCollaber;
22 }
23
24 public function isExtranet(): bool
25 {
26 if ($this->isExtranet === null)
27 {
28 $this->isExtranet = (new User($this->userId))->isExtranet();
29 }
30
31 return $this->isExtranet;
32 }
33
34 public function isIntranet(): bool
35 {
36 if ($this->isIntranet === null)
37 {
38 $this->isIntranet = (new User($this->userId))->isIntranet();
39 }
40
41 return $this->isIntranet;
42 }
43
44 public function isMember(int $groupId): bool
45 {
46 $userGroups = array_keys(UserRegistry::getInstance($this->userId)->getUserGroups());
47
48 return in_array($groupId, $userGroups, true);
49 }
50
51 public function getRoles(): array
52 {
53 return $this->getAccessCodes();
54 }
55
56 public function getPermission(string $permissionId): ?int
57 {
58 return null;
59 }
60
61 public function getAccessCodes(): array
62 {
63 return array_merge(parent::getAccessCodes(), ['AU']);
64 }
65}
getPermission(string $permissionId)
Определения UserModel.php:56
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804