Symfony News

New in Symfony 3.4: User impersonation improvements

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.

Added impersonation details in the debug toolbar

Contributed by
Yonel Ceruto
in #23026.

In Symfony 3.4, the security panel of the Web Debug Toolbar will include more details when using impersonation. First, it will also show the username of the impersonator user. Second, it will include a link to exit from the impersonation:

Be trained by Symfony experts - 2017-09-13 Paris - 2017-09-18 Paris - 2017-09-25 Cologne

About us

What a Symfony developer should know about the framework: News, Jobs, Tweets, Events, Videos,...

Find us on Twitter

Find us on Facebook