fix: [users:edit] DatabaseException in group-admin for condition with empty list of values

develop
Sami Mokaddem 2024-09-24 14:34:06 +02:00
parent 1c93a71f80
commit ad3a8ee7c5
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ class UsersController extends AppController
$org_conditions = []; $org_conditions = [];
if (empty($currentUser['role']['perm_community_admin'])) { if (empty($currentUser['role']['perm_community_admin'])) {
$org_conditions = ['id' => $currentUser['organisation_id']]; $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]; $org_conditions = ['id IN' => $validOrgIds];
} }
} }