Skip to content

Commit

Permalink
Fix wrong usage in custom authenticator checking if password is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas committed Aug 23, 2018
1 parent e13ef43 commit 94f2951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/custom_password_authenticator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
}
Expand Down

0 comments on commit 94f2951

Please sign in to comment.