summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-01-12 16:25:11 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-01-13 10:19:50 +0100
commit713f2b3a52a6b2de2c8d8604e25718eccc03406e (patch)
treefd0fb353fbabdc214c53513d258cc0832f4b7eb8
parent0d39a63b05df2691a7dc94da3e6d98ad153ea03a (diff)
downloadnextcloud-server-713f2b3a52a6b2de2c8d8604e25718eccc03406e.tar.gz
nextcloud-server-713f2b3a52a6b2de2c8d8604e25718eccc03406e.zip
fix retrieval of user groups
Conflicts: apps/user_ldap/lib/connection.php
-rw-r--r--apps/user_ldap/lib/access.php6
-rw-r--r--apps/user_ldap/lib/connection.php4
2 files changed, 8 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index b6e851379d9..fef4cc57d47 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -97,7 +97,11 @@ class Access extends LDAPUtility implements user\IUserTools {
$this->abandonPagedSearch();
// openLDAP requires that we init a new Paged Search. Not needed by AD,
// 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);
$rr = @$this->ldap->read($cr, $dn, $filter, array($attr));
if(!$this->ldap->isResource($rr)) {
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 13c6b8b37fa..34a1cb39f9c 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -26,10 +26,12 @@ namespace OCA\user_ldap\lib;
//magic properties (incomplete)
/**
* responsible for LDAP connections in context with the provided configuration
+ *
* @property string ldapUserFilter
* @property string ldapUserDisplayName
* @property boolean hasPagedResultSupport
-*/
+ * @property int|string ldapPagingSize holds an integer
+ */
class Connection extends LDAPUtility {
private $ldapConnectionRes = null;
private $configPrefix;