Ojs\AdminBundle\Controller\AdminController::dashboardCheckAction PHP Method

dashboardCheckAction() public method

public dashboardCheckAction ( ) : RedirectResponse
return Symfony\Component\HttpFoundation\RedirectResponse
    public function dashboardCheckAction()
    {
        if ($this->getUser()) {
            if ($this->getUser()->isAdmin()) {
                return $this->redirectToRoute('ojs_admin_dashboard');
            } else {
                return $this->redirectToRoute('ojs_user_index');
            }
        } else {
            throw new AccessDeniedException('You are not allowed to see this page');
        }
    }