diff options
Diffstat (limited to 'lib/private/util.php')
-rw-r--r-- | lib/private/util.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 9abaef71a68..746a2e09523 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -223,7 +223,12 @@ class OC_Util { if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { $user = \OCP\User::getUser(); $groupsList = \OC::$server->getAppConfig()->getValue('core', 'shareapi_exclude_groups_list', ''); - $excludedGroups = explode(',', $groupsList); + $excludedGroups = json_decode($groupsList); + if (is_null($excludedGroups)) { + $excludedGroups = explode(',', $groupsList); + $newValue = json_encode($excludedGroups); + \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', $newValue); + } $usersGroups = \OC_Group::getUserGroups($user); if (!empty($usersGroups)) { $remainingGroups = array_diff($usersGroups, $excludedGroups); |