Created
June 25, 2012 19:03
-
-
Save irwinv/2990554 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Symfony\Component\HttpFoundation\RedirectResponse; | |
... | |
$route = $this->container->get('request')->get('_route'); | |
$user = $this->container->get('security.context')->getToken()->getUser(); | |
if($router == "myapp_accueil" && $user != "anon."){ | |
$url = $this->container->get('router')->generate("myapp_espace_perso"); | |
return new RedirectResponse($url); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment