mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 05:10:12 +01:00
ldap auth fix
This commit is contained in:
parent
aa402744a9
commit
676f479d23
@ -69,7 +69,7 @@ class ModelUserAuth extends Model {
|
|||||||
|
|
||||||
$query = $ldap->query(LDAP_BASE_DN, "(&(objectClass=" . LDAP_ACCOUNT_OBJECTCLASS . ")(" . LDAP_MAIL_ATTR . "=$username))", array());
|
$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;
|
$a = $query->row;
|
||||||
|
|
||||||
$ldap_auth = new LDAP(LDAP_HOST, $a['dn'], $password);
|
$ldap_auth = new LDAP(LDAP_HOST, $a['dn'], $password);
|
||||||
|
Loading…
Reference in New Issue
Block a user