Skip to content
Snippets Groups Projects
Commit 068b4fc6 authored by Olav Morken's avatar Olav Morken
Browse files

Print error message from LDAP when the bind operation fails.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@71 44740490-163a-0410-bde0-09ae8108e29a
parent 9ad73005
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,8 @@ if (isset($_POST['username'])) {
}
*/
if (!ldap_bind($ds, $dn, $pwd)) {
$error = "Bind failed, wrong username or password. Tried with DN=[" . $dn . "] DNPattern=[" . $config->getValue('auth.ldap.dnpattern') . "]";
$error = "Bind failed, wrong username or password. Tried with DN=[" . $dn . "] DNPattern=[" . $config->getValue('auth.ldap.dnpattern')
. "] Error=[" . ldap_error($ds) . "] ErrNo=[" . ldap_errno($ds) . "]";
$logger->log(LOG_NOTICE, $session->getTrackID(), 'AUTH', 'ldap', 'Fail', $_POST['username'], $_POST['username'] . ' failed to authenticate');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment