Skip to content

Commit 8af36c9

Browse files
committed
Disabled UserStatsSubscriber when IS_IMPERSONATOR
1 parent d6d06ad commit 8af36c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EventSubscriber/UserStatsSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function onKernelRequest(RequestEvent $event)
4444
$user = $this->security->getUser();
4545
$route = $event->getRequest()->get('_route');
4646

47-
if ($user && $route) {
47+
if ($user && $route && !$this->security->isGranted('IS_IMPERSONATOR')) {
4848

4949
$excludeRoute = $this->containerBag->get('fluffy_user_stats')['exclude_route'];
5050

0 commit comments

Comments
 (0)