aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Repository
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/UserBundle/Repository')
-rw-r--r--src/Wallabag/UserBundle/Repository/UserRepository.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php
index 009c4881..178761e6 100644
--- a/src/Wallabag/UserBundle/Repository/UserRepository.php
+++ b/src/Wallabag/UserBundle/Repository/UserRepository.php
@@ -38,4 +38,18 @@ class UserRepository extends EntityRepository
38 ->getQuery() 38 ->getQuery()
39 ->getSingleResult(); 39 ->getSingleResult();
40 } 40 }
41
42 /**
43 * Count how many users are enabled.
44 *
45 * @return int
46 */
47 public function getSumEnabledUsers()
48 {
49 return $this->createQueryBuilder('u')
50 ->select('count(u)')
51 ->andWhere('u.expired = 0')
52 ->getQuery()
53 ->getSingleScalarResult();
54 }
41} 55}