File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed 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)
6262 }
6363
6464 if (null === $ user ) {
65- throw new UsernameNotFoundException (sprintf ('User "%s" not found. ' , $ username ));
65+ $ e = new UsernameNotFoundException (sprintf ('User "%s" not found. ' , $ username ));
66+ $ e ->setUsername ($ username );
67+
68+ throw $ e ;
6669 }
6770
6871 return $ user ;
@@ -92,7 +95,10 @@ public function refreshUser(UserInterface $user)
9295
9396 $ refreshedUser = $ repository ->find ($ id );
9497 if (null === $ refreshedUser ) {
95- throw new UsernameNotFoundException ('User with id ' .json_encode ($ id ).' not found. ' );
98+ $ e = new UsernameNotFoundException ('User with id ' .json_encode ($ id ).' not found. ' );
99+ $ e ->setUsername (json_encode ($ id ));
100+
101+ throw $ e ;
96102 }
97103 }
98104
You can’t perform that action at this time.
0 commit comments