diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 0fd106366d4..fef222f40ea 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -723,6 +723,18 @@ class Access extends LDAPUtility { return $this->search($filter, $this->connection->ldapBaseGroups, $attr, $limit, $offset); } + /** + * returns the number of available groups + * @param string $filter the LDAP search filter + * @param string[] $attr optional + * @param int|null $limit + * @param int|null $offset + * @return int|bool + */ + public function countGroups($filter, $attr = array('dn'), $limit = null, $offset = null) { + return $this->count($filter, $this->connection->ldapBaseGroups, $attr, $limit, $offset); + } + /** * @brief prepares and executes an LDAP search operation * @param $filter the LDAP filter for the search