Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function __invoke(CheckLanguageDetectionEvent $event): void |
||
17 | { |
||
18 | if (!$this->siteConfigurationService->getConfiguration($event->getSite())->isDisableRedirectWithBackendSession()) { |
||
19 | return; |
||
20 | } |
||
21 | /** @var Context $context */ |
||
22 | $context = GeneralUtility::makeInstance(Context::class); |
||
23 | $isLoggedIn = (bool)$context->getAspect('backend.user')->get('isLoggedIn'); |
||
24 | if ($isLoggedIn) { |
||
25 | $event->disableLanguageDetection(); |
||
26 | } |
||
29 |