Implements Drupal\Core\Password\PasswordInterface::userNeedsNewHash().
Overrides PasswordInterface::userNeedsNewHash
public function userNeedsNewHash($account) {
// Check whether this was an updated password.
if (substr($account->pass, 0, 3) != '$S$' || strlen($account->pass) != static::HASH_LENGTH) {
return TRUE;
}
// Ensure that $count_log2 is within set bounds.
$count_log2 = $this
->enforceLog2Boundaries($this->countLog2);
// Check whether the iteration count used differs from the standard number.
return $this
->getCountLog2($account->pass) !== $count_log2;
}