2
« on: October 15, 2009, 05:08:14 pm »
It seems that there is a bug in the search functions.
I have corrected a bit the code and it works :
In the function
function isValidPasswordLdap($user, $password, $config) {
In the User.class.pho file the end of the function is now :
if ($search->count() != 1) {
return false;
}
foreach($search as $dn => $dummy) {
}
$bind_result = $ldap->bind( $dn, $password);
if (PEAR::isError($bind_result)) {
return false;
}
return true;
}
Than in the Access Controller.class.php I have added a test to keep the admin as a local user...
$userIsValidPassword = $user->isValidPasswordLdap($username, $password, $config_ldap);
if (!$userIsValidPassword) {
$userIsValidPassword = $user->isValidPassword($password);
}
} else {
$userIsValidPassword = $user->isValidPassword($password);
}