From 94f2951f5fa05b6db2e28a838fdac74aaa293033 Mon Sep 17 00:00:00 2001 From: Tomas Date: Thu, 23 Aug 2018 09:13:19 +0300 Subject: [PATCH] Fix wrong usage in custom authenticator checking if password is invalid --- security/custom_password_authenticator.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.'); } }