From: Craig Andrews Date: Fri, 26 Feb 2010 20:50:51 +0000 (-0500) Subject: Show messaging on the login and registration forms informing users that they may... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=74bcc6929db15b18b761564232a1cb674ffbdce2;p=quix0rs-gnu-social.git Show messaging on the login and registration forms informing users that they may use their LDAP credentials --- diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index 1b5dc92e3f..d6a945f497 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---//