| Conditions | 5 |
| Paths | 6 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function operatorOgrU(): bool |
||
| 22 | { |
||
| 23 | $result = false; |
||
| 24 | $groups = \App\Fields\Owner::getInstance($this->recordModel->getModuleName())->getGroups(false, 'private'); |
||
| 25 | $usersByGroup = []; |
||
| 26 | if ($groups) { |
||
| 27 | foreach (array_keys($groups) as $idGroup) { |
||
| 28 | $usersByGroup = (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$idGroup}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $idGroup)])->column(); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | foreach (explode(',', $this->getValue()) as $userValue) { |
||
| 32 | if (in_array($userValue, $usersByGroup)) { |
||
| 33 | $result = true; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | return $result; |
||
| 37 | } |
||
| 39 |