File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/Symfony/Bridge/Doctrine/Security/User Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,10 @@ public function loadUserByUsername($username)
62
62
}
63
63
64
64
if (null === $ user ) {
65
- throw new UsernameNotFoundException (sprintf ('User "%s" not found. ' , $ username ));
65
+ $ ex = new UsernameNotFoundException (sprintf ('User "%s" not found. ' , $ username ));
66
+ $ ex ->setUsername ($ username );
67
+
68
+ throw $ ex ;
66
69
}
67
70
68
71
return $ user ;
@@ -92,7 +95,10 @@ public function refreshUser(UserInterface $user)
92
95
93
96
$ refreshedUser = $ repository ->find ($ id );
94
97
if (null === $ refreshedUser ) {
95
- throw new UsernameNotFoundException ('User with id ' .json_encode ($ id ).' not found. ' );
98
+ $ ex = new UsernameNotFoundException ('User with id ' .json_encode ($ id ).' not found. ' );
99
+ $ ex ->setUsername (json_encode ($ id ));
100
+
101
+ throw $ ex ;
96
102
}
97
103
}
98
104
You can’t perform that action at this time.
0 commit comments