diff options
Diffstat (limited to 'lib/group/database.php')
-rw-r--r-- | lib/group/database.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/group/database.php b/lib/group/database.php index 1e2328f4c08..8816dd8169c 100644 --- a/lib/group/database.php +++ b/lib/group/database.php @@ -200,7 +200,9 @@ class OC_Group_Database extends OC_Group_Backend { * @return array with user ids */ public function usersInGroup($gid, $search = '', $limit = null, $offset = null) { - $stmt = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?', $limit, $offset); + $stmt = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?', + $limit, + $offset); $result = $stmt->execute(array($gid, $search.'%')); $users = array(); while ($row = $result->fetchRow()) { @@ -220,7 +222,12 @@ class OC_Group_Database extends OC_Group_Backend { public function DisplayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
$displayNames = ''; - $stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname` FROM `*PREFIX*users` INNER JOIN `*PREFIX*group_user` ON `*PREFIX*group_user`.`uid` = `*PREFIX*users`.`uid` WHERE `gid` = ? AND `*PREFIX*group_user.uid` LIKE ?', $limit, $offset);
+ $stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname`' + .' FROM `*PREFIX*users`' + .' INNER JOIN `*PREFIX*group_user` ON `*PREFIX*group_user`.`uid` = `*PREFIX*users`.`uid`' + .' WHERE `gid` = ? AND `*PREFIX*group_user.uid` LIKE ?', + $limit, + $offset); $result = $stmt->execute(array($gid, $search.'%'));
$users = array();
while ($row = $result->fetchRow()) { |