diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-07 14:48:55 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-07 14:48:55 -0400 |
commit | 3533f43d12f2a0246dcdde72d2e68002da61e601 (patch) | |
tree | 30b86f628297ff3b9b412c6693e50e17cdd2a8f9 /lib/group | |
parent | 8d56c42fde24790b1912fe0c88fa80a472747ccb (diff) | |
download | nextcloud-server-3533f43d12f2a0246dcdde72d2e68002da61e601.tar.gz nextcloud-server-3533f43d12f2a0246dcdde72d2e68002da61e601.zip |
Implement groupExists in group database backend
Diffstat (limited to 'lib/group')
-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 6314a127438..b989f6ae028 100644 --- a/lib/group/database.php +++ b/lib/group/database.php @@ -175,6 +175,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 */ |