| @@ 1525-1529 (lines=5) @@ | ||
| 1522 | if ($this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { |
|
| 1523 | $groupsList = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', ''); |
|
| 1524 | $excludedGroups = json_decode($groupsList); |
|
| 1525 | if (is_null($excludedGroups)) { |
|
| 1526 | $excludedGroups = explode(',', $groupsList); |
|
| 1527 | $newValue = json_encode($excludedGroups); |
|
| 1528 | $this->config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 1529 | } |
|
| 1530 | $user = $this->userManager->get($userId); |
|
| 1531 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1532 | if (!empty($usersGroups)) { |
|
| @@ 319-323 (lines=5) @@ | ||
| 316 | if ($config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { |
|
| 317 | $groupsList = $config->getAppValue('core', 'shareapi_exclude_groups_list', ''); |
|
| 318 | $excludedGroups = json_decode($groupsList); |
|
| 319 | if (is_null($excludedGroups)) { |
|
| 320 | $excludedGroups = explode(',', $groupsList); |
|
| 321 | $newValue = json_encode($excludedGroups); |
|
| 322 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 323 | } |
|
| 324 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 325 | if (!empty($usersGroups)) { |
|
| 326 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|