Skip to content

Commit

Permalink
BUGFIX: Case insensitive user search on Postgres
Browse files Browse the repository at this point in the history
PostgreSQL is by default case sensitive and its hard to
find users depending on their name in the users
module.
  • Loading branch information
Sebobo committed Jun 27, 2024
1 parent 59d4af2 commit 8289604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Neos.Neos/Classes/Domain/Repository/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function findBySearchTerm(string $searchTerm, string $sortBy, string $sor
$query = $this->createQuery();
$query->matching(
$query->logicalOr(
$query->like('accounts.accountIdentifier', '%' . $searchTerm . '%'),
$query->like('name.fullName', '%' . $searchTerm . '%')
$query->like('accounts.accountIdentifier', '%' . $searchTerm . '%', false),
$query->like('name.fullName', '%' . $searchTerm . '%', false)
)
);
return $query->setOrderings([$sortBy => $sortDirection])->execute();
Expand Down

0 comments on commit 8289604

Please sign in to comment.