Skip to content

Commit

Permalink
feature #4749 [2.3][Book][Security] Add isPasswordValid doc as in 2.6…
Browse files Browse the repository at this point in the history
… (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 99aca45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99aca45

Please sign in to comment.