Correction to work good with the Net_LDAP2 2.2.0

pull/5364/head
Zbigniew Szmyd 9 years ago
parent 8bbb454524
commit acbc67ea1c

@ -187,12 +187,14 @@ class rcube_ldap_password
); );
$result = $ldap->search($base, $filter, $options); $result = $ldap->search($base, $filter, $options);
$ldap->done();
if (is_a($result, 'PEAR_Error') || ($result->count() != 1)) { if (is_a($result, 'PEAR_Error') || ($result->count() != 1)) {
return ''; $dn = '';
} else {
$dn = $result->current()->dn();
} }
$ldap->done();
return $result->current()->dn(); return $dn;
} }
/** /**

Loading…
Cancel
Save