Skip to content

Commit

Permalink
[BUGFIX] Avoid displaying deleted users in toolbar widget
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeuling committed Dec 31, 2019
1 parent bbe9002 commit 74e592a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.idea
2 changes: 2 additions & 0 deletions Classes/Domain/Repository/BackendUserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function findByMultipleProperties(string $search): QueryResultInterface
$queryBuilder->matching(
$queryBuilder->logicalAnd([
$queryBuilder->equals('admin', 0),
$queryBuilder->equals('deleted', 0),
$queryBuilder->logicalOr([
$queryBuilder->like('username', "%$search%"),
$queryBuilder->like('realName', "%$search%"),
Expand All @@ -51,6 +52,7 @@ public function findNonAdmins($uids = []): QueryResultInterface
$queryBuilder = $this->createQuery();

$constraints[] = $queryBuilder->equals('admin', 0);
$constraints[] = $queryBuilder->equals('deleted', 0);
if (!empty($uids)) {
$constraints[] = $queryBuilder->in('uid', $uids);
}
Expand Down

0 comments on commit 74e592a

Please sign in to comment.