fix retrieval of user groups
This commit is contained in:
parent
5f7c115dfe
commit
f28235a7ef
|
@ -149,7 +149,11 @@ class Access extends LDAPUtility implements user\IUserTools {
|
||||||
$this->abandonPagedSearch();
|
$this->abandonPagedSearch();
|
||||||
// openLDAP requires that we init a new Paged Search. Not needed by AD,
|
// openLDAP requires that we init a new Paged Search. Not needed by AD,
|
||||||
// but does not hurt either.
|
// but does not hurt either.
|
||||||
$this->initPagedSearch($filter, array($dn), array($attr), 1, 0);
|
$pagingSize = intval($this->connection->ldapPagingSize);
|
||||||
|
// 0 won't result in replies, small numbers may leave out groups
|
||||||
|
// (cf. #12306), 500 is default for paging and should work everywhere.
|
||||||
|
$maxResults = $pagingSize < 20 ? $pagingSize : 500;
|
||||||
|
$this->initPagedSearch($filter, array($dn), array($attr), $maxResults, 0);
|
||||||
$dn = $this->DNasBaseParameter($dn);
|
$dn = $this->DNasBaseParameter($dn);
|
||||||
$rr = @$this->ldap->read($cr, $dn, $filter, array($attr));
|
$rr = @$this->ldap->read($cr, $dn, $filter, array($attr));
|
||||||
if(!$this->ldap->isResource($rr)) {
|
if(!$this->ldap->isResource($rr)) {
|
||||||
|
|
|
@ -26,11 +26,13 @@ namespace OCA\user_ldap\lib;
|
||||||
//magic properties (incomplete)
|
//magic properties (incomplete)
|
||||||
/**
|
/**
|
||||||
* responsible for LDAP connections in context with the provided configuration
|
* responsible for LDAP connections in context with the provided configuration
|
||||||
|
*
|
||||||
* @property string ldapUserFilter
|
* @property string ldapUserFilter
|
||||||
* @property string ldapUserDisplayName
|
* @property string ldapUserDisplayName
|
||||||
* @property boolean hasPagedResultSupport
|
* @property boolean hasPagedResultSupport
|
||||||
* @property string[] ldapBaseUsers
|
* @property string[] ldapBaseUsers
|
||||||
*/
|
* @property int|string ldapPagingSize holds an integer
|
||||||
|
*/
|
||||||
class Connection extends LDAPUtility {
|
class Connection extends LDAPUtility {
|
||||||
private $ldapConnectionRes = null;
|
private $ldapConnectionRes = null;
|
||||||
private $configPrefix;
|
private $configPrefix;
|
||||||
|
|
Loading…
Reference in New Issue