From 8f03c311f28eaffe92893ec1a4d0b78581926e13 Mon Sep 17 00:00:00 2001 From: Patrick Brown Date: Wed, 6 May 2015 15:31:08 -0400 Subject: Error reporting for database auth plugins --- lib/plugins/authad/auth.php | 8 ++++++-- lib/plugins/authad/lang/en/lang.php | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/plugins/authad') 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 */ -$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 : -- cgit v1.2.3 From c9a3a44ccbcf2ff1ed427df5f6911a1028989e43 Mon Sep 17 00:00:00 2001 From: Danny Buckhof Date: Thu, 7 May 2015 14:45:55 +0200 Subject: translation update --- lib/plugins/authad/lang/no/lang.php | 3 +++ lib/plugins/authad/lang/no/settings.php | 3 +++ 2 files changed, 6 insertions(+) (limited to 'lib/plugins/authad') diff --git a/lib/plugins/authad/lang/no/lang.php b/lib/plugins/authad/lang/no/lang.php index f8dbb0b08..b497c4719 100644 --- a/lib/plugins/authad/lang/no/lang.php +++ b/lib/plugins/authad/lang/no/lang.php @@ -5,6 +5,9 @@ * * @author Patrick * @author Thomas Juberg + * @author Danny Buckhof */ $lang['domain'] = 'Loggpå-domene'; $lang['authpwdexpire'] = 'Ditt passord går ut om %d dager, du bør endre det snarest.'; +$lang['passchangefail'] = 'Feil ved endring av passord. Det kan være at passordet ikke er i tråd med passordpolicyen '; +$lang['connectfail'] = 'Feil ved kontakt med Active Directory serveren.'; diff --git a/lib/plugins/authad/lang/no/settings.php b/lib/plugins/authad/lang/no/settings.php index f309ead50..727f6611d 100644 --- a/lib/plugins/authad/lang/no/settings.php +++ b/lib/plugins/authad/lang/no/settings.php @@ -5,7 +5,10 @@ * * @author Christopher Schive * @author Patrick + * @author Danny Buckhof */ $lang['account_suffix'] = 'Ditt konto-suffiks F. Eks. @my.domain.org'; $lang['admin_password'] = 'Passordet til brukeren over.'; +$lang['use_ssl'] = 'Bruk SSL tilknytning? Hvis denne brukes, ikke aktiver TLS nedenfor.'; +$lang['use_tls'] = 'Bruk TLS tilknytning? Hvis denne brukes, ikke aktiver SSL over.'; $lang['expirywarn'] = 'Antall dager på forhånd brukeren varsles om at passordet utgår. 0 for å deaktivere.'; -- cgit v1.2.3