function UserAuthDecorator::authenticate

Same name and namespace in other branches
  1. 11.x core/modules/user/tests/modules/user_auth_decorator_test/src/UserAuthDecorator.php \Drupal\user_auth_decorator_test\UserAuthDecorator::authenticate()

Validates user authentication credentials.

Parameters

string $username: The user name to authenticate.

string $password: A plain-text password, such as trimmed text from form values.

Return value

int|bool The user's uid on success, or FALSE on failure to authenticate.

Overrides UserAuthInterface::authenticate

File

core/modules/user/tests/modules/user_auth_decorator_test/src/UserAuthDecorator.php, line 24

Class

UserAuthDecorator
Helper to validate UserAuthInterface BC layers are functional.

Namespace

Drupal\user_auth_decorator_test

Code

public function authenticate($username, #[\SensitiveParameter] $password) {
  return $this->inner
    ->authenticate($username, $password);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.