function UserAuth::authenticateAccount
1 call to UserAuth::authenticateAccount()
- UserAuth::authenticate in core/
modules/ user/ src/ UserAuth.php
File
-
core/
modules/ user/ src/ UserAuth.php, line 61
Class
- UserAuth
- Validates user authentication credentials.
Namespace
Drupal\userCode
public function authenticateAccount(UserInterface $account, string $password) : bool {
if ($this->passwordChecker
->check($password, $account->getPassword())) {
// Update user to new password scheme if needed.
if ($this->passwordChecker
->needsRehash($account->getPassword())) {
$account->setPassword($password);
$account->save();
}
return TRUE;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.