diff --git a/security/custom_password_authenticator.rst b/security/custom_password_authenticator.rst index 9b556a1b818..d9f7efa6613 100644 --- a/security/custom_password_authenticator.rst +++ b/security/custom_password_authenticator.rst @@ -69,7 +69,7 @@ the user:: if ('' === ($givenPassword = $token->getCredentials())) { throw new BadCredentialsException('The given password cannot be empty.'); } - if (!$this->encoder->isPasswordValid($user->getPassword(), $givenPassword, $user->getSalt())) { + if (!$this->encoder->isPasswordValid($user, $givenPassword)) { throw new BadCredentialsException('The given password is invalid.'); } }