mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:20:13 +01:00
added logging to ldap auth
This commit is contained in:
parent
c21c27a6dd
commit
48ef57ca09
@ -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);
|
||||
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user