Skip to content

Commit 635618d

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: Reword impersonnating event description
2 parents 1d228b7 + d47612c commit 635618d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

security/impersonating_user.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,13 @@ not this is allowed. If your voter isn't called, see :ref:`declaring-the-voter-a
427427
Events
428428
------
429429

430-
The firewall dispatches the ``security.switch_user`` event right after the impersonation
431-
is completed. The :class:`Symfony\\Component\\Security\\Http\\Event\\SwitchUserEvent` is
432-
passed to the listener, and you can use this to get the user that you are now impersonating.
430+
the ``security.switch_user`` event is dispatched just before the impersonation
431+
is fully completed. Your :doc:`listener or subscriber </event_dispatcher>` will
432+
receive a :class:`Symfony\\Component\\Security\\Http\\Event\\SwitchUserEvent`,
433+
which you can use to get the user that you are now impersonating.
434+
435+
This event is also dispatched just before impersonation is fully exited. You can
436+
use it to get the original impersonator user.
433437

434438
The :ref:`locale-sticky-session` section does not update the locale when you
435439
impersonate a user. If you *do* want to be sure to update the locale when you

0 commit comments

Comments
 (0)