summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-11-09 16:17:40 -0800
committerFrederic Guillot <fred@kanboard.net>2017-11-09 16:17:40 -0800
commit455b909e4865f681dfceb969661222e229322e93 (patch)
tree45fc0dafef5e28c8889c3e5fe3119ba97f2ec958 /app/Core
parent44aa24bab16bdc2545b08594386adb24ead3aa9e (diff)
Add limit argument to ldap_search()
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Ldap/Query.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Core/Ldap/Query.php b/app/Core/Ldap/Query.php
index 0f9abb5c..0fe7f2d3 100644
--- a/app/Core/Ldap/Query.php
+++ b/app/Core/Ldap/Query.php
@@ -44,9 +44,10 @@ class Query
* @param string $baseDn
* @param string $filter
* @param array $attributes
- * @return Query
+ * @param integer $limit
+ * @return $this
*/
- public function execute($baseDn, $filter, array $attributes)
+ public function execute($baseDn, $filter, array $attributes, $limit = 0)
{
if (DEBUG && $this->client->hasLogger()) {
$this->client->getLogger()->debug('BaseDN='.$baseDn);
@@ -54,7 +55,7 @@ class Query
$this->client->getLogger()->debug('Attributes='.implode(', ', $attributes));
}
- $sr = ldap_search($this->client->getConnection(), $baseDn, $filter, $attributes);
+ $sr = @ldap_search($this->client->getConnection(), $baseDn, $filter, $attributes, null, $limit);
if ($sr === false) {
return $this;
}