Search code examples
symfonysymfony1

Same authentication token in multiples symfony application


When I authenticate in my app1, I get authenticate in my app2 too.

Exemple.

I login at localhost/app1/web/app_dev.pho/login as "foo_user". When I check my localhost/app2/web/app_dev.php/ I am also authenticated as "foo_user" when I was anon. just before.

Do you know how can I fix that ?


Solution

  • You must use in your function something like this

    public function toDo() { $user = $this->getUser(); ..... return ['user' => $user]; } And than in your template use user how you want. It's only one of few examples, how you can do it