ldap auth fix

This commit is contained in:
SJ 2013-04-17 16:33:36 +02:00
parent aa402744a9
commit 676f479d23

View File

@ -69,7 +69,7 @@ class ModelUserAuth extends Model {
$query = $ldap->query(LDAP_BASE_DN, "(&(objectClass=" . LDAP_ACCOUNT_OBJECTCLASS . ")(" . LDAP_MAIL_ATTR . "=$username))", array());
if(isset($query->row)) {
if(isset($query->row['dn'])) {
$a = $query->row;
$ldap_auth = new LDAP(LDAP_HOST, $a['dn'], $password);