Added button to user admin to impersonate a certain user

This commit is contained in:
Jan Böhmer 2023-07-08 22:43:41 +02:00
parent d20153c569
commit cc1595e048
6 changed files with 145 additions and 25 deletions

View file

@ -78,6 +78,11 @@ final class PasswordChangeNeededSubscriber implements EventSubscriberInterface
return;
}
//If the user is impersonated, we don't need to redirect him
if ($this->security->isGranted('IS_IMPERSONATOR')) {
return;
}
//Abort if we dont need to redirect the user.
if (!$user->isNeedPwChange() && !static::TFARedirectNeeded($user)) {
return;