Permalink
Browse files

feature #4749 [2.3][Book][Security] Add isPasswordValid doc as in 2.6…

… (xelaris)

This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Book][Security] Add isPasswordValid doc as in 2.6

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | >=2.3
| Fixed tickets |

As mentioned in #4744 (comment) the paragraph from 2.6 branch is also applicable to 2.3.

Commits
-------

0f67a1d [Book][Security] Add isPasswordValid doc as in 2.6
  • Loading branch information...
weaverryan committed Jan 4, 2015
2 parents f4f8621 + 0f67a1d commit 99aca4532681c1fbc5d85b2935145b3d4fe9934c
Showing with 4 additions and 0 deletions.
  1. +4 −0 book/security.rst
@@ -1117,6 +1117,10 @@ In order for this to work, just make sure that you have the encoder for your
user class (e.g. ``AppBundle\Entity\User``) configured under the ``encoders``
key in ``app/config/security.yml``.
The ``$encoder`` object also has an ``isPasswordValid`` method, which takes
the ``User`` object as the first argument and the plain password to check
as the second argument.
.. caution::
When you allow a user to submit a plaintext password (e.g. registration

0 comments on commit 99aca45

Please sign in to comment.