Skip to content

Commit

Permalink
Merge pull request #24 from tdeuling/master
Browse files Browse the repository at this point in the history
[BUGFIX] Avoid displaying deleted users in toolbar widget
  • Loading branch information
josefglatz authored Jan 12, 2020
2 parents bbe9002 + 74e592a commit 6a08ca5
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 6a08ca5

Please sign in to comment.