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/authad | |
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/authad')
-rw-r--r-- | lib/plugins/authad/auth.php | 8 | ||||
-rw-r--r-- | lib/plugins/authad/lang/en/lang.php | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 40c56ef09..60c68efc4 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -522,7 +522,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { public function modifyUser($user, $changes) { $return = true; $adldap = $this->_adldap($this->_userDomain($user)); - if(!$adldap) return false; + if(!$adldap) { + msg($this->getLang('connectfail'), -1); + return false; + } // password changing if(isset($changes['pass'])) { @@ -532,7 +535,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if ($this->conf['debug']) msg('AD Auth: '.$e->getMessage(), -1); $return = false; } - if(!$return) msg('AD Auth: failed to change the password. Maybe the password policy was not met?', -1); + if(!$return) msg($this->getLang('passchangefail'), -1); } // changing user data @@ -554,6 +557,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if ($this->conf['debug']) msg('AD Auth: '.$e->getMessage(), -1); $return = false; } + if(!$return) msg($this->getLang('userchangefail'), -1); } return $return; diff --git a/lib/plugins/authad/lang/en/lang.php b/lib/plugins/authad/lang/en/lang.php index 4f96a71fd..751aa9f47 100644 --- a/lib/plugins/authad/lang/en/lang.php +++ b/lib/plugins/authad/lang/en/lang.php @@ -6,7 +6,9 @@ * @author Andreas Gohr <gohr@cosmocode.de> */ -$lang['domain'] = 'Logon Domain'; -$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.'; +$lang['domain'] = 'Logon Domain'; +$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.'; +$lang['passchangefail'] = 'Failed to change the password. Maybe the password policy was not met?'; +$lang['connectfail'] = 'Failed to connect to Active Directory server.'; //Setup VIM: ex: et ts=4 : |