Of course there is - over the sfContext, but It's not a great
solution.

http://eatmymonkeydust.com/2009/08/symfony-forms-flexible-widgets-based-on-user-credentials/
http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/


On 6 čvn, 16:14, Alvaro Garcia <[email protected]> wrote:
> Hello!
>
> In my doctrine class (lib/model/doctrine/XXX.class.php) I have overwritten
> the constructor.
> The reason is I need to validate that an user can load this object
> (photograph in my case).
> Then, when I load a collection of photographs ($photoAlbum->getPhotos()) the
> constructor
> check the permissions.
>
> To do it I need that the doctrine class can access to the sfGuardUser.
> Is there any possibility for this class to access the user without being
> passed as a parameter?
>
> Thank you!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to