Skip to content

Commit 3a7acfb

Browse files
Linas Merkeviciuswouterj
Linas Merkevicius
authored andcommitted
Fixed loadUserByUsername function coding errors
1 parent bf1e44b commit 3a7acfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbook/security/entity_provider.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ interface requires three methods: ``loadUserByUsername($username)``,
435435
->setParameter('username', $username)
436436
->setParameter('email', $username)
437437
->getQuery()
438-
->getOneOrNullResult()
438+
->getOneOrNullResult();
439439

440-
if ($user) {
440+
if (null === $user) {
441441
$message = sprintf(
442442
'Unable to find an active admin AppBundle:User object identified by "%s".',
443443
$username

0 commit comments

Comments
 (0)