September 13, 2017 Javier Eguiluz

User impersonation is a popular Symfony security feature that allows you to browse the application as if you were another user, for instance when you are debugging or trying to understand a bug a user sees that you can't reproduce. In Symfony 3.4 we improved this feature a bit to make it easier to debug.

Added the impersonator to the log context¶ Contributed by

Gregor Harlan

in #24026. The well known security log message "User was reloaded from a user provider." includes the user provider and the username of the impersonated user in its context. In Symfony 3.4, to make things easier to debug, this context will also include the username of the impersonator user via the impersonator_username key.