More helpful message for LDAP TLS issue

This commit is contained in:
snipe 2016-08-23 11:32:11 -07:00
parent 014167699d
commit b726d131a4

View file

@ -247,8 +247,12 @@ class Ldap extends Model
// Perform the search
do {
// Paginate (non-critical, if not supported by server)
ldap_control_paged_result($ldapconn, $page_size, false, $cookie);
if (!$ldap_paging = @ldap_control_paged_result($ldapconn, $page_size, false, $cookie)) {
throw new Exception('Problem with your LDAP connection. Try checking the Use TLS setting in Admin > Settings. ');
}
$search_results = ldap_search($ldapconn, $base_dn, '('.$filter.')');