Browse Source
Make sure DI is done
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/8780/head
Joas Schilling
9 years ago
committed by
Roeland Jago Douma
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with
6 additions and
0 deletions
-
lib/private/Group/Database.php
|
|
|
@ -239,6 +239,8 @@ class Database extends Backend { |
|
|
|
* Returns a list with all groups |
|
|
|
*/ |
|
|
|
public function getGroups($search = '', $limit = null, $offset = null) { |
|
|
|
$this->fixDI(); |
|
|
|
|
|
|
|
$query = $this->dbConn->getQueryBuilder(); |
|
|
|
$query->select('gid') |
|
|
|
->from('groups') |
|
|
|
@ -300,6 +302,8 @@ class Database extends Backend { |
|
|
|
* @return array an array of user ids |
|
|
|
*/ |
|
|
|
public function usersInGroup($gid, $search = '', $limit = null, $offset = null) { |
|
|
|
$this->fixDI(); |
|
|
|
|
|
|
|
$query = $this->dbConn->getQueryBuilder(); |
|
|
|
$query->select('uid') |
|
|
|
->from('group_user') |
|
|
|
@ -332,6 +336,8 @@ class Database extends Backend { |
|
|
|
* @return int|false |
|
|
|
*/ |
|
|
|
public function countUsersInGroup($gid, $search = '') { |
|
|
|
$this->fixDI(); |
|
|
|
|
|
|
|
$query = $this->dbConn->getQueryBuilder(); |
|
|
|
$query->selectAlias($query->createFunction('COUNT(*)'), 'num_users') |
|
|
|
->from('group_user') |
|
|
|
|