function ldap_authentication_core_override_user_login_authenticate_validate in Lightweight Directory Access Protocol (LDAP) 8.3
Same name and namespace in other branches
- 8.4 ldap_authentication/ldap_authentication.module \ldap_authentication_core_override_user_login_authenticate_validate()
- 8.2 ldap_authentication/ldap_authentication.module \ldap_authentication_core_override_user_login_authenticate_validate()
- 7.2 ldap_authentication/ldap_authentication.module \ldap_authentication_core_override_user_login_authenticate_validate()
A validate handler on the login form.
Check supplied username/password against local users table. If successful, the UID from $form_state is set to the matching user ID.
Parameters
array $form: The form.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
1 string reference to 'ldap_authentication_core_override_user_login_authenticate_validate'
- _ldap_authentication_login_form_alter in ldap_authentication/
ldap_authentication.module - Helper function for the user login block.
File
- ldap_authentication/
ldap_authentication.module, line 71 - This module injects itself into Drupal's Authentication stack.
Code
function ldap_authentication_core_override_user_login_authenticate_validate(array $form, FormStateInterface &$form_state) {
// No additional validation of user credentials is needed when the uid is set.
if (!empty($form_state
->get('uid'))) {
return;
}
$original_form = $form_state
->getFormObject();
$original_form
->validateAuthentication($form, $form_state);
}