function ldap_authentication_form_user_pass_alter in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 8.4 ldap_authentication/ldap_authentication.module \ldap_authentication_form_user_pass_alter()
- 8.3 ldap_authentication/ldap_authentication.module \ldap_authentication_form_user_pass_alter()
- 7.2 ldap_authentication/ldap_authentication.module \ldap_authentication_form_user_pass_alter()
- 7 ldap_authentication/ldap_authentication.module \ldap_authentication_form_user_pass_alter()
Implements hook_form_FORM_ID_alter().
File
- ldap_authentication/
ldap_authentication.module, line 282 - This module injects itself into Drupal's Authentication stack.
Code
function ldap_authentication_form_user_pass_alter(&$form, $form_state) {
// the following could be in a theme preproces function
$auth_conf = ldap_authentication_get_valid_conf();
$form['ldap_warning'] = array(
'#type' => 'item',
'#markup' => theme('ldap_authentication_user_pass_message', array(
'auth_conf' => $auth_conf,
)),
'#weight' => 10,
);
// need to insert before user_pass_validate
array_unshift($form['#validate'], 'ldap_authentication_user_pass_validate');
}