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.
This commit is contained in:
Matthias Beyer 2013-09-19 09:49:55 +02:00 committed by Andrew McMillan
parent 495257bebb
commit 8ab19de1fe

View File

@ -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);
}