core-bundle/src/Security/Authentication/AuthenticationSuccessHandler.php
protected function determineTargetUrl(Request $request): string
    {
        if (!$this->user instanceof FrontendUser) {
            return parent::determineTargetUrl($request);
        }

        if ($targetUrl = $this->getFixedTargetPath($request)) {
            return $targetUrl;
        }

        /** @var PageModel $pageModelAdapter */
        $pageModelAdapter = $this->framework->getAdapter(PageModel::class);
        $groups = StringUtil::deserialize($this->user->groups, true);
        $groupPage = $pageModelAdapter->findFirstActiveByMemberGroups($groups);

        if ($groupPage instanceof PageModel) {
            return $groupPage->getAbsoluteUrl();
        }

        return parent::determineTargetUrl($request);
    }
protected function determineTargetUrl(Request $request): string
    {
        if (!$this->user instanceof FrontendUser) {
            return parent::determineTargetUrl($request);
        }

        if ($targetUrl = $this->getFixedTargetPath($request)) {
            return $targetUrl;
        }

        /** @var PageModel $pageModelAdapter */
        $pageModelAdapter = $this->framework->getAdapter(PageModel::class);
        $groups = StringUtil::deserialize($this->user->groups, true);
        $groupPage = $pageModelAdapter->findFirstActiveByMemberGroups($groups);

        if ($groupPage instanceof PageModel) {
            return $groupPage->getAbsoluteUrl();
        }

        return parent::determineTargetUrl($request);
    }
protected function determineTargetUrl ( Request $ request ) : string { if ( ! $ this -> user instanceof FrontendUser ) { return parent :: determineTargetUrl ( $ request ) ; } if ( $ targetUrl = $ this -> getFixedTargetPath ( $ request ) ) { return $ targetUrl ; } /** @var PageModel $pageModelAdapter */ $ pageModelAdapter = $ this -> framework -> getAdapter ( PageModel :: class ) ; $ groups = StringUtil :: deserialize ( $ this -> user -> groups , true ) ; $ groupPage = $ pageModelAdapter -> findFirstActiveByMemberGroups ( $ groups ) ; if ( $ groupPage instanceof PageModel ) { return $ groupPage -> getAbsoluteUrl ( ) ; } return parent :: determineTargetUrl ( $ request ) ; }
{@inheritdoc}
{