Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cookbook/security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ the username and then check the password (more on passwords in a moment):
<firewall name="default" pattern="^/" provider="our_db_provider">
<http-basic />
</firewall>

<!-- ... -->
</config>

Expand Down Expand Up @@ -474,7 +474,7 @@ For more details on these methods, see :class:`Symfony\\Component\\Security\\Cor

.. tip::

Don't forget to add the repository class to the
Don't forget to add the repository class to the
:ref:`mapping definition of your entity <book-doctrine-custom-repository-classes>`.

To finish this, just remove the ``property`` key from the user provider in
Expand Down Expand Up @@ -720,7 +720,8 @@ fetch the user and their associated roles with a single query::
->where('u.username = :username OR u.email = :email')
->setParameter('username', $username)
->setParameter('email', $username)
->getQuery();
->getQuery()
->getOneOrNullResult();

// ...
}
Expand Down