summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-01-12 16:25:11 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-01-12 16:25:11 +0100
commitf28235a7ef6664978a8b4f6d16a47df508244294 (patch)
tree7455de5ddc4197a434f51d0bd2d24b61c39eca8e /apps/user_ldap
parent5f7c115dfee58db718d0887562a5a8df8ccc7279 (diff)
downloadnextcloud-server-f28235a7ef6664978a8b4f6d16a47df508244294.tar.gz
nextcloud-server-f28235a7ef6664978a8b4f6d16a47df508244294.zip
fix retrieval of user groups
Diffstat (limited to 'apps/user_ldap')
-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 f3657176f70..0fb968cebe7 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -149,7 +149,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 c9b4fded9f9..a9d21ffc8e7 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -26,11 +26,13 @@ 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 string[] ldapBaseUsers
-*/
+ * @property int|string ldapPagingSize holds an integer
+ */
class Connection extends LDAPUtility {
private $ldapConnectionRes = null;
private $configPrefix;