8000 minor #10120 Update custom_password_authenticator.rst (rpodwika) · symfony/symfony-docs@c7b9cf1 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7b9cf1

Browse files
committed
minor #10120 Update custom_password_authenticator.rst (rpodwika)
This PR was submitted for the 4.1 branch but it was merged into the 2.8 branch instead (closes #10120). Discussion ---------- Update custom_password_authenticator.rst In the example there's no encoder factory defined, only encoder itself. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- f096458 Update custom_password_authenticator.rst
2 parents cdfaff3 + f096458 commit c7b9cf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/custom_password_authenticator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ the user::
6969
if ('' === ($givenPassword = $token->getCredentials())) {
7070
throw new BadCredentialsException('The given password cannot be empty.');
7171
}
72-
if (!$this->encoderFactory->getEncoder($user)->isPasswordValid($user->getPassword(), $givenPassword, $user->getSalt())) {
72+
if (!$this->encoder->isPasswordValid($user->getPassword(), $givenPassword, $user->getSalt())) {
7373
throw new BadCredentialsException('The given password is invalid.');
7474
}
7575
}

0 commit comments

Comments
 (0)
0