From 1f21370b2069e017f2c8624026a0a5caa5b4fb07 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 19 Sep 2013 09:49:55 +0200 Subject: [PATCH] Added dbg_error_log() calls for error msgs If the ldap driver is not valid, the error messages were not printed. There was just "Couldn't contact LDAP server for authentication" - But why? This commit adds a print loop for all messages from the global $c->messages message array. --- inc/drivers_ldap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index a6665297..144abadd 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -328,6 +328,9 @@ function LDAP_check($username, $password ){ $ldapDriver = getStaticLdap(); if ( !$ldapDriver->valid ) { dbg_error_log( "ERROR", "Couldn't contact LDAP server for authentication" ); + foreach($c->messages as $msg) { + dbg_error_log( "ERROR", "-> ".$msg ); + } header( sprintf("HTTP/1.1 %d %s", 503, translate("Authentication server unavailable.")) ); exit(0); }