mirror of
https://github.com/wallabag/wallabag.git
synced 2025-10-05 19:31:02 +00:00
Add filter to users management page
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
e1d64050ad
commit
c37515f880
17 changed files with 170 additions and 28 deletions
|
@ -52,4 +52,19 @@ class UserRepository extends EntityRepository
|
|||
->getQuery()
|
||||
->getSingleScalarResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves users filtered with a search term.
|
||||
*
|
||||
* @param string $term
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function getUsersForSearch($term)
|
||||
{
|
||||
return $this->createQueryBuilder('u')
|
||||
->andWhere('lower(u.username) LIKE lower(:term) OR lower(u.email) LIKE lower(:term) OR lower(u.name) LIKE lower(:term)')->setParameter('term', '%'.$term.'%')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue