我在文档中发现了2个问题。 你能告诉我这是否对你也有问题吗? 在https://symfony.com/doc/3.4/security/custom_password_authenticator.html页上 第43行:
if (!$this->encoder->isPasswordValid($user->getPassword(), $givenPassword, $user->getSalt())) {
throw new BadCredentialsException('The given password is invalid.');
}
代替:
if (!$this->encoder->isPasswordValid($user, $givenPassword, $user->getSalt())) {
throw new BadCredentialsException('The given password is invalid.');
}
第48行
if ($isPasswordValid) {
*$isPasswordValid* is empty
}