Skip to content

Commit

Permalink
Fixed loadUserByUsername function coding errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Linas Merkevicius authored and wouterj committed Apr 7, 2015
1 parent bf1e44b commit 3a7acfb
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 3a7acfb

Please sign in to comment.