added logging to ldap auth

This commit is contained in:
SJ 2013-04-03 22:45:05 +02:00
parent c21c27a6dd
commit 48ef57ca09
2 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,8 @@ class ModelUserAuth extends Model {
$ldap_auth = new LDAP(LDAP_HOST, $a['dn'], $password);
if(ENABLE_SYSLOG == 1) { syslog(LOG_INFO, "ldap auth against '" . LDAP_HOST . "', dn: '" . $a['dn'] . "', result: " . $ldap_auth->is_bind_ok()); }
if($ldap_auth->is_bind_ok()) {
$emails = $this->get_email_array_from_ldap_attr($query->rows);

View File

@ -36,6 +36,8 @@ class LDAP {
$results = ldap_get_entries($this->link, $sr);
if(ENABLE_SYSLOG == 1) { syslog(LOG_INFO, sprintf("ldap query: base dn='%s', filter='%s', attr='%s', %d hits", $basedn, $filter, implode(" ", $justthese), $results['count'])); }
for($i=0; $i < $results['count']; $i++) {
for($k=0; $k < $results[$i]['count']; $k++) {
$attr = $results[$i][$k];