]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/UserBundle/Repository/UserRepository.php
add search argument and limit option to list users command
[github/wallabag/wallabag.git] / src / Wallabag / UserBundle / Repository / UserRepository.php
index 75cbeef20b28e6c02b445920dd89a5f88c2da10f..be693d3b1312f6e86aae660c3798ee2b1e5d6530 100644 (file)
@@ -55,6 +55,19 @@ class UserRepository extends EntityRepository
             ->getSingleScalarResult();
     }
 
+    /**
+     * Count how many users are existing.
+     *
+     * @return int
+     */
+    public function getSumUsers()
+    {
+        return $this->createQueryBuilder('u')
+            ->select('count(u)')
+            ->getQuery()
+            ->getSingleScalarResult();
+    }
+
     /**
      * Retrieves users filtered with a search term.
      *