[symfony-users] Re: How to get security user in PHP template

2011-04-06 Thread pzwosta
Additional info: Without main firewall I don't get a token at all.If I add the main firewall I get anon. as user but not the username of the real user from the login page. What I want is a main page that is freely available but with a login/logout button for further services. When the user is logg

[symfony-users] Re: How to get security user in PHP template

2011-04-06 Thread pzwosta
Sorry what I wanted to say is that the user token doesn't exist while _security_profile does. GlobalVariables.php: public function getUser() { if (!$security = $this->getSecurity()) { return; } if (!$token = $security->getToken()) { return;

Re: [symfony-users] Re: How to get security user in PHP template

2011-04-05 Thread Christophe COEVOET
Le 05/04/2011 22:51, pzwosta a écrit : Thanks $app-getUser() and the security.context exist in the container but doesn't return the username though authentication was successful. The username only exists in the _security_profile token of the session which I don't know how to unserialize. regards

[symfony-users] Re: How to get security user in PHP template

2011-04-05 Thread pzwosta
Thanks $app-getUser() and the security.context exist in the container but doesn't return the username though authentication was successful. The username only exists in the _security_profile token of the session which I don't know how to unserialize. regards Peter On 5 Apr., 22:21, Christophe COEV