| @@ 1403-1407 (lines=5) @@ | ||
| 1400 | if ($this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { |
|
| 1401 | $groupsList = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', ''); |
|
| 1402 | $excludedGroups = json_decode($groupsList); |
|
| 1403 | if (is_null($excludedGroups)) { |
|
| 1404 | $excludedGroups = explode(',', $groupsList); |
|
| 1405 | $newValue = json_encode($excludedGroups); |
|
| 1406 | $this->config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 1407 | } |
|
| 1408 | $user = $this->userManager->get($userId); |
|
| 1409 | $usersGroups = $this->groupManager->getUserGroupIds($user); |
|
| 1410 | if (!empty($usersGroups)) { |
|
| @@ 310-314 (lines=5) @@ | ||
| 307 | if ($config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { |
|
| 308 | $groupsList = $config->getAppValue('core', 'shareapi_exclude_groups_list', ''); |
|
| 309 | $excludedGroups = json_decode($groupsList); |
|
| 310 | if (is_null($excludedGroups)) { |
|
| 311 | $excludedGroups = explode(',', $groupsList); |
|
| 312 | $newValue = json_encode($excludedGroups); |
|
| 313 | $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); |
|
| 314 | } |
|
| 315 | $usersGroups = $groupManager->getUserGroupIds($user); |
|
| 316 | if (!empty($usersGroups)) { |
|
| 317 | $remainingGroups = array_diff($usersGroups, $excludedGroups); |
|