Conditions | 5 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function operatorOgu(): bool |
||
22 | { |
||
23 | $result = false; |
||
24 | $groups = \App\User::getCurrentUserModel()->getGroups(); |
||
25 | $usersByGroups = []; |
||
26 | if ($groups) { |
||
27 | foreach ($groups as $groupId) { |
||
28 | $usersByGroups[] = (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$groupId}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $groupId)])->column(); |
||
29 | } |
||
30 | foreach ($usersByGroups as $usersByGroup) { |
||
31 | if (array_intersect(explode(',', $this->getValue()), $usersByGroup)) { |
||
32 | $result = true; |
||
33 | break; |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 | return $result; |
||
38 | } |
||
40 |