diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-09 21:21:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-09 21:21:03 +0200 |
commit | 418626e8365f64f50e0cae3676376629155fdb20 (patch) | |
tree | a5b2ce9de000862aa86c75c4c5facd791d6035ba /src/Wallabag/UserBundle | |
parent | d9b0673dbb1138e805e039610cef893e49abe3d8 (diff) | |
parent | 9810f30821105f6340b64e8bdca9f91b9da8a6ba (diff) | |
download | wallabag-418626e8365f64f50e0cae3676376629155fdb20.tar.gz wallabag-418626e8365f64f50e0cae3676376629155fdb20.tar.zst wallabag-418626e8365f64f50e0cae3676376629155fdb20.zip |
Merge pull request #2177 from wallabag/delete-account
Delete user
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r-- | src/Wallabag/UserBundle/Repository/UserRepository.php | 14 |
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..445edb3c 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 = false') | ||
52 | ->getQuery() | ||
53 | ->getSingleScalarResult(); | ||
54 | } | ||
41 | } | 55 | } |