The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Now redirecting logged in users to main page from registration form

master
Polonkai Gergely 11 years ago
parent 3b911976d3
commit 837d93b14c
  1. 6
      src/KekRozsak/SecurityBundle/Controller/DefaultController.php

@ -5,6 +5,7 @@ namespace KekRozsak\SecurityBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\User\UserInterface;
use KekRozsak\FrontBundle\Entity\User;
use KekRozsak\FrontBundle\Form\Type\UserType;
@ -34,6 +35,11 @@ class DefaultController extends Controller
public function registrationAction(Request $request)
{
$user = $this->get('security.context')->getToken()->getUser();
if ($user instanceof UserInterface)
{
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_homepage'));
}
$user = new User();
$form = $this->createForm(new UserType(true), $user);

Loading…
Cancel
Save