From 1b7dc1098c0c26932ec634dfeab68dc15e4d7ce6 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 16 Oct 2015 13:10:39 +0200 Subject: [PATCH] DbUserGroupBackend: Use LEFT JOIN to join the group_membership table Fixes the issue that groups are not found if they do not have any members even though they meet the where clause --- library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php index 5596f18b6..6f5c2e9dd 100644 --- a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php +++ b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php @@ -250,7 +250,7 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa */ protected function joinGroupMembership(RepositoryQuery $query) { - $query->getQuery()->join( + $query->getQuery()->joinLeft( $this->requireTable('group_membership'), 'g.id = gm.group_id', array()