Fix: debugage authentification ldap
This commit is contained in:
parent
98a17e685a
commit
79f66318c6
@ -436,9 +436,11 @@ class Ldap
|
|||||||
** "uid=username, ou=People, dc=orgname,dc=com"
|
** "uid=username, ou=People, dc=orgname,dc=com"
|
||||||
*/
|
*/
|
||||||
if ($this->serverType == "activedirectory") {
|
if ($this->serverType == "activedirectory") {
|
||||||
$checkDn = "$uname@$this->domain";
|
$domain = eregi_replace('dc=','',$this->domain);
|
||||||
|
$domain = eregi_replace(',','.',$domain);
|
||||||
|
$checkDn = "$uname@$domain";
|
||||||
} else {
|
} else {
|
||||||
$checkDn = $this->getUserIdentifier() . "=$uname, " . $this->setDn(true);
|
$checkDn = $this->getUserIdentifier() . "=$uname, " . $this->setDn(true);
|
||||||
}
|
}
|
||||||
// Try and connect...
|
// Try and connect...
|
||||||
$this->result = @ldap_bind( $this->connection,$checkDn,$pass);
|
$this->result = @ldap_bind( $this->connection,$checkDn,$pass);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user