]> source.dussan.org Git - nextcloud-server.git/commitdiff
group LDAP: implement groupExists function, needed for Sharing
authorArthur Schiwon <blizzz@owncloud.com>
Mon, 16 Apr 2012 14:23:00 +0000 (16:23 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 16 Apr 2012 14:23:00 +0000 (16:23 +0200)
apps/user_ldap/group_ldap.php

index ce87b074ab28f7f30ee0216aee8d7ad84926dc79..e5948459dd0ff89eca17b6ce4518ef74e2fbbf9a 100644 (file)
@@ -103,6 +103,15 @@ class OC_GROUP_LDAP extends OC_Group_Backend {
                }
        }
 
+       /**
+        * check if a group exists
+        * @param string $gid
+        * @return bool
+        */
+       public function groupExists($gid){
+               return in_array($gid, $this->getGroups());
+       }
+
        private function retrieveList($filter, $attr) {
                $list = OC_LDAP::search($filter, $attr);