mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
add method to count groups on LDAP
This commit is contained in:
parent
f56a9c08f8
commit
53e036e5c0
1 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue