mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-31 18:31:02 +00:00
Added check if there is only one user
Added translations and documentation
This commit is contained in:
parent
abb5291cd5
commit
bb0c78f4a6
17 changed files with 50 additions and 1 deletions
|
@ -38,4 +38,18 @@ class UserRepository extends EntityRepository
|
|||
->getQuery()
|
||||
->getSingleResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Count how many users are enabled.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getSumEnabledUsers()
|
||||
{
|
||||
return $this->createQueryBuilder('u')
|
||||
->select('count(u)')
|
||||
->andWhere('u.expired = 0')
|
||||
->getQuery()
|
||||
->getSingleScalarResult();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue