function PasswordInterface::check
Same name in other branches
- 9 core/lib/Drupal/Core/Password/PasswordInterface.php \Drupal\Core\Password\PasswordInterface::check()
- 8.9.x core/lib/Drupal/Core/Password/PasswordInterface.php \Drupal\Core\Password\PasswordInterface::check()
- 10 core/lib/Drupal/Core/Password/PasswordInterface.php \Drupal\Core\Password\PasswordInterface::check()
Check whether a plain text password matches a hashed password.
Parameters
string $password: A plain-text password.
string|null $hash: A hashed password.
Return value
bool TRUE if the password is valid, FALSE if not.
2 methods override PasswordInterface::check()
- PhpassHashedPasswordBase::check in core/
lib/ Drupal/ Core/ Password/ PhpassHashedPasswordBase.php - PhpPassword::check in core/
lib/ Drupal/ Core/ Password/ PhpPassword.php
File
-
core/
lib/ Drupal/ Core/ Password/ PasswordInterface.php, line 37
Class
- PasswordInterface
- Secure password hashing functions for user authentication.
Namespace
Drupal\Core\PasswordCode
public function check($password, $hash);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.