[symfony-users] How do I check roles in the controller?

2011-05-11 Thread thesaint
According to the book, i can call is_granted in the template. But how do I check in a controller if a user has a specific role? I'd like to redirect to different pages depending on which role a user has. -- If you want to report a vulnerability issue on symfony, please send it to security at

Re: [symfony-users] How do I check roles in the controller?

2011-05-11 Thread Christophe COEVOET
Le 11/05/2011 18:49, thesaint a écrit : According to the book, i can call is_granted in the template. But how do I check in a controller if a user has a specific role? I'd like to redirect to different pages depending on which role a user has.

Re: [symfony-users] How do I check roles in the controller?

2011-05-11 Thread Carl
Speaking of roles, is there a way to update the list of roles a user has in the token after a user has logged in? For example, lets say a user is given a ROLE_MEMBER role after subscribing to a portion of a website. The user is updated and persisted in a database. However, the list of roles