summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/access.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 82a375b50ec..fa8546f1cea 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -515,6 +515,11 @@ abstract class Access {
$pagedSearchOK = $this->initPagedSearch($filter, $base, $attr, $limit, $offset);
$sr = ldap_search($link_resource, $base, $filter, $attr);
+ if(!$sr) {
+ \OCP\Util::writeLog('user_ldap', 'Error when searching: '.ldap_error($link_resource).' code '.ldap_errno($link_resource), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('user_ldap', 'Attempt for Paging? '.print_r($pagedSearchOK, true), \OCP\Util::ERROR);
+ return array();
+ }
$findings = ldap_get_entries($link_resource, $sr );
if($pagedSearchOK) {
\OCP\Util::writeLog('user_ldap', 'Paged search successful', \OCP\Util::INFO);