add method to count groups on LDAP

This commit is contained in:
Arthur Schiwon 2014-06-11 14:33:11 +02:00
parent f56a9c08f8
commit 53e036e5c0

View file

@ -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