diff options
Diffstat (limited to 'lib/group/database.php')
-rw-r--r-- | lib/group/database.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/group/database.php b/lib/group/database.php index 1cb4171f49f..0b4ae393cf1 100644 --- a/lib/group/database.php +++ b/lib/group/database.php @@ -179,6 +179,20 @@ class OC_Group_Database extends OC_Group_Backend { } /** + * check if a group exists + * @param string $gid + * @return bool + */ + public function groupExists($gid) { + $query = OC_DB::prepare('SELECT gid FROM *PREFIX*groups WHERE gid = ?'); + $result = $query->execute(array($gid))->fetchOne(); + if ($result) { + return true; + } + return false; + } + + /** * @brief get a list of all users in a group * @returns array with user ids */ |