File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -156,18 +156,19 @@ private function refreshUser(TokenInterface $token)
156
156
157
157
foreach ($ this ->userProviders as $ provider ) {
158
158
try {
159
- $ token ->setUser ($ provider ->refreshUser ($ user ));
159
+ $ refreshedUser = $ provider ->refreshUser ($ user );
160
+ $ token ->setUser ($ refreshedUser );
160
161
161
162
if (null !== $ this ->logger ) {
162
- $ this ->logger ->debug (sprintf ('Username "%s" was reloaded from user provider. ' , $ user ->getUsername ()));
163
+ $ this ->logger ->debug (sprintf ('Username "%s" was reloaded from user provider. ' , $ refreshedUser ->getUsername ()));
163
164
}
164
165
165
166
return $ token ;
166
167
} catch (UnsupportedUserException $ unsupported ) {
167
168
// let's try the next user provider
168
169
} catch (UsernameNotFoundException $ notFound ) {
169
170
if (null !== $ this ->logger ) {
170
- $ this ->logger ->warning (sprintf ('Username "%s" could not be found. ' , $ user ->getUsername ()));
171
+ $ this ->logger ->warning (sprintf ('Username "%s" could not be found. ' , $ notFound ->getUsername ()));
171
172
}
172
173
173
174
return null ;
You can’t perform that action at this time.
0 commit comments