From ad3a8ee7c5671856372a77a4826711cc3c27ffa2 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 24 Sep 2024 14:34:06 +0200 Subject: [PATCH] fix: [users:edit] DatabaseException in group-admin for condition with empty list of values --- src/Controller/UsersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index 438b3bf..8bcdaa9 100644 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -336,7 +336,7 @@ class UsersController extends AppController $org_conditions = []; if (empty($currentUser['role']['perm_community_admin'])) { $org_conditions = ['id' => $currentUser['organisation_id']]; - if (!empty($currentUser['role']['perm_group_admin'])) { + if (!empty($currentUser['role']['perm_group_admin']) && !empty($validOrgIds)) { $org_conditions = ['id IN' => $validOrgIds]; } }