aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Group_LDAP.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/Group_LDAP.php')
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index 376af8520d0..699205cf501 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -685,7 +685,7 @@ class Group_LDAP extends ABackend implements GroupInterface, IGroupLDAP, IGetDis
protected function getCachedGroupsForUserId(string $uid): array {
$groupStr = $this->config->getUserValue($uid, 'user_ldap', 'cached-group-memberships-' . $this->access->connection->getConfigPrefix(), '[]');
- return json_decode($groupStr) ?? [];
+ return json_decode($groupStr, true) ?? [];
}
/**
@@ -838,7 +838,7 @@ class Group_LDAP extends ABackend implements GroupInterface, IGroupLDAP, IGetDis
return $groups;
}
- $groups = array_unique($groups, SORT_LOCALE_STRING);
+ $groups = array_values(array_unique($groups, SORT_LOCALE_STRING));
$this->access->connection->writeToCache($cacheKey, $groups);
$groupStr = \json_encode($groups);