You are here

private function LoginValidator::validateAlreadyAuthenticated in Lightweight Directory Access Protocol (LDAP) 8.3

Validate already authenticated user.

Return value

bool Pass or continue.

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

File

ldap_authentication/src/Controller/LoginValidator.php, line 771

Class

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

Namespace

Drupal\ldap_authentication\Controller

Code

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