diff options
author | Andreas Gohr <andi@splitbrain.org> | 2015-05-07 09:42:30 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2015-05-07 09:42:30 +0200 |
commit | af865bf3762dff1ddfeb3bd15be46b605499a58b (patch) | |
tree | d5635fb24073ca01b733a66f29ae8f836ce51d1f /lib/plugins/authldap/auth.php | |
parent | 15e0e2356bfd266851932e1cde1287da7c5e201a (diff) | |
parent | e6c4392f11bb5a668be8e874560af910b71d72f8 (diff) | |
download | rpg-af865bf3762dff1ddfeb3bd15be46b605499a58b.tar.gz rpg-af865bf3762dff1ddfeb3bd15be46b605499a58b.tar.bz2 |
Merge pull request #1134 from ptbrown/auth-error-reporting
Refactor error messages from auth plugins.
Diffstat (limited to 'lib/plugins/authldap/auth.php')
-rw-r--r-- | lib/plugins/authldap/auth.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 9d031c049..247a0fec2 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -281,14 +281,14 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // open the connection to the ldap if(!$this->_openLDAP()){ - msg('LDAP cannot connect: '. htmlspecialchars(ldap_error($this->con))); + $this->_debug('LDAP cannot connect: '. htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } // find the information about the user, in particular the "dn" $info = $this->getUserData($user,true); if(empty($info['dn'])) { - msg('LDAP cannot find your user dn'); + $this->_debug('LDAP cannot find your user dn', 0, __LINE__, __FILE__); return false; } $dn = $info['dn']; @@ -301,7 +301,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // bind with the ldap if(!@ldap_bind($this->con, $dn, $pass)){ - msg('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->_debug('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } } elseif ($this->getConf('binddn') && $this->getConf('bindpw')) { @@ -322,7 +322,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // change the password if(!@ldap_mod_replace($this->con, $dn,array('userpassword' => $hash))){ - msg('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con))); + $this->_debug('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } |