From 74bcc6929db15b18b761564232a1cb674ffbdce2 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 26 Feb 2010 15:50:51 -0500 Subject: Show messaging on the login and registration forms informing users that they may use their LDAP credentials --- .../LdapAuthenticationPlugin.php | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'plugins/LdapAuthentication/LdapAuthenticationPlugin.php') diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index 1b5dc92e3..d6a945f49 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -76,6 +76,32 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin return false; } } + + function onEndShowPageNotice($action) + { + $name = $action->trimmed('action'); + $instr = false; + + switch ($name) + { + case 'register': + if($this->autoregistration) { + $instr = 'Have an LDAP account? Use your standard username and password.'; + } + break; + case 'login': + $instr = 'Have an LDAP account? Use your standard username and password.'; + break; + default: + return true; + } + + if($instr) { + $output = common_markup_to_html($instr); + $action->raw($output); + } + return true; + } //---interface implementation---// -- cgit v1.2.3-54-g00ecf