From 6509fc98ef19868a4011bd27079d32dfbf719b6d Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Wed, 30 Aug 2017 14:03:34 +0200 Subject: [PATCH] Use "impersonator user" instead of "impersonating user" --- security/impersonating_user.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }