Symfony security: useful methods for the view
31/01/2008Check if user is logged in:
$sf_user->isAuthenticated()
Check if user belongs to a specific group:
$sf_user->hasCredential('admin')
small snippets of webmonkey wisdom
Check if user is logged in:
$sf_user->isAuthenticated()
Check if user belongs to a specific group:
$sf_user->hasCredential('admin')
The commonly used
$this->getRequestParameter('blah')
is a shortened version of
$this->getRequest()->getRequestParameter('blah')
All sorts of other goodies are available using $this->getRequest(), including for example:
$this->getRequest()->getPathInfo()