diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/group/database.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/group/database.php b/lib/private/group/database.php index 852b55d770d..b7148f38fe3 100644 --- a/lib/private/group/database.php +++ b/lib/private/group/database.php @@ -221,7 +221,11 @@ class OC_Group_Database extends OC_Group_Backend { public function countUsersInGroup($gid, $search = '') { $stmt = OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?'); $result = $stmt->execute(array($gid, '%' . $search . '%')); - return $result->fetchOne(); + $count = $result->fetchOne(); + if($count !== false) { + $count = intval($count); + } + return $count; } } |