Skip to content

Commit

Permalink
bug #5149 Fixed loadUserByUsername method coding errors (Linas Merkev…
Browse files Browse the repository at this point in the history
…icius)

This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #5149).

Discussion
----------

Fixed loadUserByUsername method coding errors

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.6, 2.7, 3.0
| Fixed tickets |

Commits
-------

3a7acfb Fixed loadUserByUsername function coding errors
  • Loading branch information
wouterj committed Apr 7, 2015
2 parents bf1e44b + 3a7acfb commit 8fc3d6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cookbook/security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ interface requires three methods: ``loadUserByUsername($username)``,
->setParameter('username', $username)
->setParameter('email', $username)
->getQuery()
->getOneOrNullResult()
->getOneOrNullResult();

if ($user) {
if (null === $user) {
$message = sprintf(
'Unable to find an active admin AppBundle:User object identified by "%s".',
$username
Expand Down

0 comments on commit 8fc3d6c

Please sign in to comment.