Skip to content

Commit 3cc3bf2

Browse files
committed
Do not count disabled users.
Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
1 parent 2d83a88 commit 3cc3bf2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Query/QueryProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ private function loadQueries()
140140
Query::COUNT_GROUPS =>
141141
"SELECT COUNT(DISTINCT ug.$ugUID) " .
142142
"FROM $userGroup ug " .
143+
(empty($uDisabled) ? "" : "LEFT JOIN $user u ON u.$uUID = ug.$ugUID ") .
143144
"WHERE ug.$ugGID LIKE :$gidParam " .
144-
"AND ug.$ugUID LIKE :$searchParam",
145+
"AND ug.$ugUID LIKE :$searchParam" .
146+
(empty($uDisabled) ? "" : " AND NOT u.$uDisabled"),
145147

146148
Query::COUNT_USERS =>
147149
"SELECT COUNT(u.$uUID) AS count " .

0 commit comments

Comments
 (0)