|
|
@ -130,9 +130,10 @@ class rcube_ldap_password
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function search_userdn($rcmail)
|
|
|
|
function search_userdn($rcmail)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
$binddn = $rcmail->config->get('password_ldap_searchDN');
|
|
|
|
|
|
|
|
$bindpw = $rcmail->config->get('password_ldap_searchPW');
|
|
|
|
|
|
|
|
|
|
|
|
$ldapConfig = array (
|
|
|
|
$ldapConfig = array (
|
|
|
|
'binddn' => $rcmail->config->get('password_ldap_searchDN'),
|
|
|
|
|
|
|
|
'bindpw' => $rcmail->config->get('password_ldap_searchPW'),
|
|
|
|
|
|
|
|
'basedn' => $rcmail->config->get('password_ldap_basedn'),
|
|
|
|
'basedn' => $rcmail->config->get('password_ldap_basedn'),
|
|
|
|
'host' => $rcmail->config->get('password_ldap_host'),
|
|
|
|
'host' => $rcmail->config->get('password_ldap_host'),
|
|
|
|
'port' => $rcmail->config->get('password_ldap_port'),
|
|
|
|
'port' => $rcmail->config->get('password_ldap_port'),
|
|
|
@ -140,6 +141,12 @@ class rcube_ldap_password
|
|
|
|
'version' => $rcmail->config->get('password_ldap_version'),
|
|
|
|
'version' => $rcmail->config->get('password_ldap_version'),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// allow anonymous searches
|
|
|
|
|
|
|
|
if (!empty($binddn)) {
|
|
|
|
|
|
|
|
$ldapConfig['binddn'] = $binddn;
|
|
|
|
|
|
|
|
$ldapConfig['bindpw'] = $bindpw;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$ldap = Net_LDAP2::connect($ldapConfig);
|
|
|
|
$ldap = Net_LDAP2::connect($ldapConfig);
|
|
|
|
|
|
|
|
|
|
|
|
if (PEAR::isError($ldap)) {
|
|
|
|
if (PEAR::isError($ldap)) {
|
|
|
|