From 8ab19de1fef36d45a7d4dc419d0c20271851ae91 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 1c080467..7acc1382 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -335,6 +335,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); }