You are here

protected function LoginValidatorLoginForm::userAlreadyAuthenticated in Lightweight Directory Access Protocol (LDAP) 8.4

Validate already authenticated user.

Return value

bool User already authenticated.

1 call to LoginValidatorLoginForm::userAlreadyAuthenticated()
LoginValidatorLoginForm::processLogin in ldap_authentication/src/Controller/LoginValidatorLoginForm.php
Perform the actual logging in.

File

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

Class

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

Namespace

Drupal\ldap_authentication\Controller

Code

protected function userAlreadyAuthenticated() : bool {
  if (!empty($this->formState
    ->get('uid'))) {
    if ($this->config
      ->get('authenticationMode') === 'mixed') {
      $this->detailLog
        ->log('%username: Previously authenticated in mixed mode, pass on validation.', [
        '%username' => $this->authName,
      ], 'ldap_authentication');
      return TRUE;
    }
  }
  return FALSE;
}