Show messaging on the login and registration forms informing users that they may use their LDAP credentials

This commit is contained in:
Craig Andrews 2010-02-26 15:50:51 -05:00
parent 410cd52434
commit 74bcc6929d

View File

@ -77,6 +77,32 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
}
}
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---//
function checkPassword($username, $password)