function UserAuthenticationInterface::authenticateAccount

Validates user authentication credentials for an account.

This can be used where the account has already been located using the login credentials.

Parameters

\Drupal\Core\Session\AccountInterface $account: The account to authenticate.

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

Return value

bool TRUE on success, FALSE on failure.

1 method overrides UserAuthenticationInterface::authenticateAccount()
UserAuthentication::authenticateAccount in core/modules/user/src/UserAuthentication.php
Validates user authentication credentials for an account.

File

core/modules/user/src/UserAuthenticationInterface.php, line 35

Class

UserAuthenticationInterface
An interface for validating user authentication credentials.

Namespace

Drupal\user

Code

public function authenticateAccount(UserInterface $account, string $password) : bool;

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