summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-04-29 21:18:29 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-04-29 21:19:10 +0200
commit700e5e08401c171177e368cb46e54b805f49b816 (patch)
tree78ee988c8b1beab274bd89b8a57a06f9fba6bb29
parent15572ce3a023ea3c6093dc595107564a7f35d7cb (diff)
duser_ldap: ignore errors from ldap_bind
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/libraries/Duser/drivers/Duser_ldap.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/libraries/Duser/drivers/Duser_ldap.php b/application/libraries/Duser/drivers/Duser_ldap.php
index 97a593bdc..1f1581620 100644
--- a/application/libraries/Duser/drivers/Duser_ldap.php
+++ b/application/libraries/Duser/drivers/Duser_ldap.php
@@ -54,7 +54,8 @@ class Duser_ldap extends Duser_Driver {
return false;
}
- if (ldap_bind($ds, $result[0]['dn'], $password)) {
+ // ignore errors from ldap_bind as it will throw an error if the password is incorrect
+ if (@ldap_bind($ds, $result[0]['dn'], $password)) {
ldap_unbind($ds);
return array(
"username" => $result[0][$config["username_field"]][0],