From 52f58a11bc56c5874d0e31c4bfc14e70a8919a6f Mon Sep 17 00:00:00 2001 From: John Webb Date: Tue, 14 Apr 2015 12:28:58 -0500 Subject: [PATCH] Updated the join query so that it would provide a UserInterface instead of a Query object --- cookbook/security/entity_provider.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index bca65414289..96ad27b401e 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -240,7 +240,7 @@ the username and then check the password (more on passwords in a moment): - + @@ -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 `. To finish this, just remove the ``property`` key from the user provider in @@ -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(); // ... }