function UserAuthInterface::authenticate
Same name in other branches
- 8.9.x core/modules/user/src/UserAuthInterface.php \Drupal\user\UserAuthInterface::authenticate()
- 10 core/modules/user/src/UserAuthInterface.php \Drupal\user\UserAuthInterface::authenticate()
- 11.x core/modules/user/src/UserAuthInterface.php \Drupal\user\UserAuthInterface::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.
1 method overrides UserAuthInterface::authenticate()
- UserAuth::authenticate in core/
modules/ user/ src/ UserAuth.php - Validates user authentication credentials.
File
-
core/
modules/ user/ src/ UserAuthInterface.php, line 21
Class
- UserAuthInterface
- An interface for validating user authentication credentials.
Namespace
Drupal\userCode
public function authenticate($username, $password);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.