What is the alternative for user_check_password in drupal 8 What is the alternative for user_check_password(), How I can verify a plane password with a user account?
$uid = \Drupal::service('user.auth')-&gt;authenticate('testusername', 'testpassword');

if ($uid) {
// do stuff
 }