public function onAuthenticationSuccess(Request $request, TokenInterface $token)
    {
        if ($user = $token->getUser()) {
            if (!$user->getFirstName() || !$user->getLastName()) {
                return new RedirectResponse($this->router->generate('opifer_cms_user_profile'));
            }
        }

        return parent::onAuthenticationSuccess($request, $token);
    }
public function onAuthenticationSuccess(Request $request, TokenInterface $token)
    {
        if ($user = $token->getUser()) {
            if (!$user->getFirstName() || !$user->getLastName()) {
                return new RedirectResponse($this->router->generate('opifer_cms_user_profile'));
            }
        }

        return parent::onAuthenticationSuccess($request, $token);
    }
public function onAuthenticationSuccess ( Request $ request , TokenInterface $ token ) { if ( $ user = $ token -> getUser ( ) ) { if ( ! $ user -> getFirstName ( ) || ! $ user -> getLastName ( ) ) { return new RedirectResponse ( $ this -> router -> generate ( 'opifer_cms_user_profile' ) ) ; } } return parent :: onAuthenticationSuccess ( $ request , $ token ) ; }
Checks if the user has actually filled in some mandatory data. If not, it redirects to the users'
profile page.

{@inheritdoc}
Checks if the user has actually filled in some mandatory data . If not it redirects to the users profile page .