Snippet: Symfony User - Access the User Object
The following snippets provide access to the Symfony User object from various parts of a Symfony project. Template / View $user = $sf_user; Model or Form $user = sfContext::getInstance()->getUser(); Note: the context isn't setup when using the command line, therefore if you use this in the…