diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-04-27 16:23:54 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-05-02 15:28:39 +0200 |
commit | 50cfd8108b8e318fd28564d2e9d30943ab12aac0 (patch) | |
tree | e5b5da24c787d2278e8c2771f00686311be11504 /src/Wallabag/UserBundle/Repository | |
parent | c37515f880bd05b86e3e848cc184018295ec1920 (diff) | |
download | wallabag-50cfd8108b8e318fd28564d2e9d30943ab12aac0.tar.gz wallabag-50cfd8108b8e318fd28564d2e9d30943ab12aac0.tar.zst wallabag-50cfd8108b8e318fd28564d2e9d30943ab12aac0.zip |
Add pagination
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/UserBundle/Repository')
-rw-r--r-- | src/Wallabag/UserBundle/Repository/UserRepository.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php index 66bbab39..6adbe329 100644 --- a/src/Wallabag/UserBundle/Repository/UserRepository.php +++ b/src/Wallabag/UserBundle/Repository/UserRepository.php | |||
@@ -60,11 +60,9 @@ class UserRepository extends EntityRepository | |||
60 | * | 60 | * |
61 | * @return QueryBuilder | 61 | * @return QueryBuilder |
62 | */ | 62 | */ |
63 | public function getUsersForSearch($term) | 63 | public function getQueryBuilderForSearch($term) |
64 | { | 64 | { |
65 | return $this->createQueryBuilder('u') | 65 | return $this->createQueryBuilder('u') |
66 | ->andWhere('lower(u.username) LIKE lower(:term) OR lower(u.email) LIKE lower(:term) OR lower(u.name) LIKE lower(:term)')->setParameter('term', '%'.$term.'%') | 66 | ->andWhere('lower(u.username) LIKE lower(:term) OR lower(u.email) LIKE lower(:term) OR lower(u.name) LIKE lower(:term)')->setParameter('term', '%'.$term.'%'); |
67 | ->getQuery() | ||
68 | ->getResult(); | ||
69 | } | 67 | } |
70 | } | 68 | } |