Skip to content

Commit 8fc3d6c

Browse files
committed
bug #5149 Fixed loadUserByUsername method coding errors (Linas Merkevicius)
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
2 parents bf1e44b + 3a7acfb commit 8fc3d6c

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)