From 700e5e08401c171177e368cb46e54b805f49b816 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 29 Apr 2013 21:18:29 +0200 Subject: duser_ldap: ignore errors from ldap_bind Signed-off-by: Florian Pritz --- application/libraries/Duser/drivers/Duser_ldap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'application/libraries') 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], -- cgit v1.2.3-24-g4f1b