Skip to content

Commit 605cc00

Browse files
Merge branch '5.4' into 6.0
* 5.4: (46 commits) move username/password fix to non-deprecated Connection class cs fix [VarDumper] Fix dumping twig templates found in exceptions do not replace definition arguments that have not been configured fix Console tests on Windows [Validator] Add translations for CIDR constraint [Dotenv] Fix testLoadEnv() to start from a fresh context [Console] Add completion to server:dump command bug #42194 [RateLimiter] fix: sliding window policy to use microtime [Validator] Update validators.sr_Cyrl.xlf [Validator] Update validators.sr_Latn.xlf Add suggestions for the option 'format' of lints commands: twig, yaml and xliff [VarDumper] Add support for Fiber uzb translation Update validators.uz.xlf Fix logging of impersonator introduced in 5.3 [Console] Add show proxified command class in completion debug skip command completion tests with older Symfony Console versions [Uid] Allow use autocompletion [Console] Add completion to messenger:setup-transports command ...
2 parents 1b91ae2 + 8bed52c commit 605cc00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Firewall/ContextListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ protected function refreshUser(TokenInterface $token): ?TokenInterface
240240
$context = ['provider' => \get_class($provider), 'username' => $refreshedUser->getUserIdentifier()];
241241

242242
if ($token instanceof SwitchUserToken) {
243-
$context['impersonator_username'] = $token->getUserIdentifier();
243+
$originalToken = $token->getOriginalToken();
244+
$context['impersonator_username'] = $originalToken->getUserIdentifier();
244245
}
245246

246247
$this->logger->debug('User was reloaded from a user provider.', $context);

0 commit comments

Comments
 (0)