diff --git a/security/impersonating_user.rst b/security/impersonating_user.rst index 9b7224bb5ea..8dcffff5719 100644 --- a/security/impersonating_user.rst +++ b/security/impersonating_user.rst @@ -103,7 +103,7 @@ to show a link to exit impersonation: -In some cases you may need to get the object that represents the impersonating +In some cases you may need to get the object that represents the impersonator user rather than the impersonated user. Use the following snippet to iterate over the user's roles until you find one that a ``SwitchUserRole`` object:: @@ -115,7 +115,7 @@ over the user's roles until you find one that a ``SwitchUserRole`` object:: if ($authChecker->isGranted('ROLE_PREVIOUS_ADMIN')) { foreach ($tokenStorage->getToken()->getRoles() as $role) { if ($role instanceof SwitchUserRole) { - $impersonatingUser = $role->getSource()->getUser(); + $impersonatorUser = $role->getSource()->getUser(); break; } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy