| @@ 328-332 (lines=5) @@ | ||
| 325 | if ($config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { |
|
| 326 | $groupsList = $config->getAppValue('core', 'shareapi_exclude_groups_list', ''); |
|
| 327 | $excludedGroups = \json_decode($groupsList); |
|
| 328 | if ($excludedGroups === null) { |
|
| 329 | $excludedGroups = \explode(',', $groupsList); |
|
| 330 | $newValue = \json_encode($excludedGroups); |
|
| 331 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 332 | } |
|
| 333 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 334 | $matchingGroups = \array_intersect($usersGroups, $excludedGroups); |
|
| 335 | if (!empty($matchingGroups)) { |
|
| @@ 1501-1505 (lines=5) @@ | ||
| 1498 | if ($this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { |
|
| 1499 | $groupsList = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', ''); |
|
| 1500 | $excludedGroups = \json_decode($groupsList); |
|
| 1501 | if ($excludedGroups === null) { |
|
| 1502 | $excludedGroups = \explode(',', $groupsList); |
|
| 1503 | $newValue = \json_encode($excludedGroups); |
|
| 1504 | $this->config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 1505 | } |
|
| 1506 | $user = $this->userManager->get($userId); |
|
| 1507 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1508 | $matchingGroups = \array_intersect($usersGroups, $excludedGroups); |
|