From b18aabcc790ad54f21f2258f1e9b1ec4015d1278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 15 Jan 2024 09:39:59 +0100 Subject: [PATCH] Fix crash of login in case of duplicated group membership MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If several LDAP configurations return the same group id for a user it should still only appear once in the return of getUserGroups Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/Group_Proxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/Group_Proxy.php b/apps/user_ldap/lib/Group_Proxy.php index 73daf4fdd7780..7410aa6a6e9d0 100644 --- a/apps/user_ldap/lib/Group_Proxy.php +++ b/apps/user_ldap/lib/Group_Proxy.php @@ -178,7 +178,7 @@ public function getUserGroups($uid) { } } - return $groups; + return array_values(array_unique($groups)); } /**