You are here

public function LoginValidatorLoginForm::validateLogin in Lightweight Directory Access Protocol (LDAP) 8.4

Starts login process.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

Return value

\Drupal\Core\Form\FormStateInterface The form state.

File

ldap_authentication/src/Controller/LoginValidatorLoginForm.php, line 24

Class

LoginValidatorLoginForm
Handles the actual testing of credentials and authentication of users.

Namespace

Drupal\ldap_authentication\Controller

Code

public function validateLogin(FormStateInterface $form_state) : FormStateInterface {
  $this->authName = trim($form_state
    ->getValue('name') ?? '');
  $this->formState = $form_state;
  $this->detailLog
    ->log('%auth_name : Beginning authentication', [
    '%auth_name' => $this->authName,
  ], 'ldap_authentication');
  $this
    ->processLogin();
  return $this->formState;
}