diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-04-15 16:28:31 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-04-15 17:11:03 +0200 |
commit | 68b1ae1a36b652de19afcb645e098e6ac6918eab (patch) | |
tree | 62aec6ec649c803b83e5a13797cb5a19a6d9b188 /lib/group | |
parent | ea99e1184d05d08e1980ade697c25bc5fe36397a (diff) | |
download | nextcloud-server-68b1ae1a36b652de19afcb645e098e6ac6918eab.tar.gz nextcloud-server-68b1ae1a36b652de19afcb645e098e6ac6918eab.zip |
OC_Group_Backend.php misses function groupexists
Fix http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-182
Diffstat (limited to 'lib/group')
-rw-r--r-- | lib/group/backend.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/group/backend.php b/lib/group/backend.php index b3fc06ac9a8..d0bc970da73 100644 --- a/lib/group/backend.php +++ b/lib/group/backend.php @@ -82,4 +82,16 @@ abstract class OC_Group_Backend { public function implementsActions($actions){ return (bool)($this->getSupportedActions() & $actions); } + + /** + * check if a group exists + * @param string $gid + * @return bool + */ + public function groupExists($gid){ + if(!$backend->implementsActions(OC_GROUP_BACKEND_GET_GROUPS)){ + return false; + } + return in_array($gid, $this->getGroups()); + } } |