]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/UserBundle/Repository/UserRepository.php
Add pagination
[github/wallabag/wallabag.git] / src / Wallabag / UserBundle / Repository / UserRepository.php
index 66bbab39b819496cbe9246eb990a33d0f9528237..6adbe329fb5519f9308be0aafc39968451ad8f88 100644 (file)
@@ -60,11 +60,9 @@ class UserRepository extends EntityRepository
      *
      * @return QueryBuilder
      */
-    public function getUsersForSearch($term)
+    public function getQueryBuilderForSearch($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();
+            ->andWhere('lower(u.username) LIKE lower(:term) OR lower(u.email) LIKE lower(:term) OR lower(u.name) LIKE lower(:term)')->setParameter('term', '%'.$term.'%');
     }
 }