Skip to content

Commit 0f67a1d

Browse files
committed
[Book][Security] Add isPasswordValid doc as in 2.6
1 parent 0507225 commit 0f67a1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

book/security.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,10 @@ In order for this to work, just make sure that you have the encoder for your
11171117
user class (e.g. ``AppBundle\Entity\User``) configured under the ``encoders``
11181118
key in ``app/config/security.yml``.
11191119

1120+
The ``$encoder`` object also has an ``isPasswordValid`` method, which takes
1121+
the ``User`` object as the first argument and the plain password to check
1122+
as the second argument.
1123+
11201124
.. caution::
11211125

11221126
When you allow a user to submit a plaintext password (e.g. registration

0 commit comments

Comments
 (0)