I have a problem in using ldap_bind()
method.
This is how I use it:
$boolIsAuth = ldap_bind($link_identifier, $bind_rdn, $bind_password);
And now the problem. If I provide a valid $bind_rdn
and a valid $bind_password
, the authentication will be made and everything will work perfectly. But, when I provide a valid $bind_rdn
and a $bind_password
different from the one from LDAP server the authentication process stops by throwing the following warning:
Warning: ldap_bind(): Unable to bind to server: Invalid credentials
I was wondering how can I skip this error? I already tried to place an @
in front of the function but I don't know why it's not working. It should have ignore the warning but... I don't know why it doesn't work.
I would like to treat this as an Exception but I can't do that. How can I skip it?