mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
fix ldap authentication
This commit is contained in:
parent
8cd3e6cada
commit
194c6c4fe8
|
@ -163,20 +163,6 @@ if (isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) {
|
||||||
} else {
|
} else {
|
||||||
$search = ldap_search($ds, $settings->_ldapBaseDN, $ldapSearchAttribut.$login);
|
$search = ldap_search($ds, $settings->_ldapBaseDN, $ldapSearchAttribut.$login);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$bind = @ldap_bind($ds, $dn, $pwd);
|
|
||||||
if ($bind) {
|
|
||||||
// Successfully authenticated. Now check to see if the user exists within
|
|
||||||
// the database. If not, add them in, but do not add their password.
|
|
||||||
$user = $dms->getUserByLogin($login);
|
|
||||||
if (is_bool($user) && !$settings->_restricted) {
|
|
||||||
// Retrieve the user's LDAP information.
|
|
||||||
|
|
||||||
|
|
||||||
/* new code by doudoux - TO BE TESTED */
|
|
||||||
$search = ldap_search($ds, $settings->_ldapBaseDN, $ldapSearchAttribut . $login);
|
|
||||||
/* old code */
|
|
||||||
//$search = ldap_search($ds, $dn, "uid=".$login);
|
|
||||||
|
|
||||||
if (!is_bool($search)) {
|
if (!is_bool($search)) {
|
||||||
$info = ldap_get_entries($ds, $search);
|
$info = ldap_get_entries($ds, $search);
|
||||||
|
@ -193,7 +179,6 @@ if (isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (is_bool($user)) {
|
if (is_bool($user)) {
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user