From 9295c161461b84887e50ba731042b23c7162dbf4 Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Tue, 14 Jul 2015 23:34:44 +0200 Subject: [PATCH] add more debug info --- css/styles.css | 1 + lib/utils.inc.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/css/styles.css b/css/styles.css index fafa79a..b90178b 100644 --- a/css/styles.css +++ b/css/styles.css @@ -5,6 +5,7 @@ color: navy; } + .user { float: right; font-family: Verdana, Arial, Helvetica, sans-serif; diff --git a/lib/utils.inc.php b/lib/utils.inc.php index b61796c..6e8f624 100644 --- a/lib/utils.inc.php +++ b/lib/utils.inc.php @@ -364,14 +364,18 @@ class Utils { } else { $domain = $p[1]; $dn = "mail=$user,ou=Users,domainName=$domain,$CFG->ldap_base_dn"; + $this->log('dn: '.var_export($dn, true), 4); $filter = "(&(objectclass=mailUser)(accountStatus=active)(mail=$user))"; + $this->log('filter: '.var_export($filter, true), 4); $ds = @ldap_connect($CFG->ldap_dsn); if ($ds) { @ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); $r = @ldap_bind($ds, $dn, $pw); if ($r) { $sr = @ldap_search($ds, $CFG->ldap_base_dn, $filter, array('mail','domainglobaladmin')); + $this->log('sr: '.var_export($sr, true), 4); $info = @ldap_get_entries($ds, $sr); // array + $this->log('info: '.var_export($info, true), 4); if ($info['count'] > 0) { // Log in to wblistadm server and get CSRFPreventionToken if ($this->getRestTicket($user, $pw)) { @@ -385,7 +389,7 @@ class Utils { } $this->settings['admin'] = ($admin == 'YES') ? true : false; } else { - $this->settings['loginStatus'] = 'Login failed'; + $this->settings['loginStatus'] = 'Login to wblistadm REST server failed'; } } else { $this->settings['loginStatus'] = 'Login failed'; -- 2.39.5