You should realy not use myUser to deal with no user related data, it's
wrong :)

I don't know your need, but I suggest you to use a component.
Just read the doc, it's simple as a include_partial, except that your
variables come from an action in a components.class.php :-)

My 2cts

On Sat, Mar 20, 2010 at 1:27 PM, xplo <xplo...@gmail.com> wrote:

> You re welcome,
>
> i m just not really active in the mailing list, i prefer using the
> real forum ~
>
> On Mar 19, 9:13 pm, alexmm <misiekaleksan...@gmail.com> wrote:
> > Oh thx so:
> > class myUser extends sfBasicSecurityUser
> > {
> >
> >     public function Test()
> >     {
> >       return Doctrine::getTable('Texts')->getRandomText();
> >     }
> >
> > }
> >
> > And in template:
> > echo $sf_user->Test()->getTresc();
> >
> > Thx You :) I don't know You - You are new user this forum ? :)
> >
> > On 19 Mar, 19:07, xplo <xplo...@gmail.com> wrote:
> >
> >
> >
> > > You can acces to the request object in the object and set and
> > > attribute with your random value.
> > > It should work but i have no idea if it s considered good practice to
> > > create a filter for that ^^;
> >
> > > You could also create a method in myUser class and call it with
> > > $sf_user in the layout/template
> >
> > > On Mar 19, 6:39 pm, alexmm <misiekaleksan...@gmail.com> wrote:
> >
> > > > I want to make query:
> > > > $this->text = Doctrine::getTable('Texts')->getRandomText();
> > > > before each action. And in view use:
> > > > echo $text->getText();
> >
> > > > How can I make this query before each action and pass result to view
> ?
> > > > Only solution is to use preExecute() function in each module with
> this
> > > > query ? Or maybe I should make this query in filter class but how can
> > > > I pass then result to view ?
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>
> To unsubscribe from this group, send email to symfony-users+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>



-- 
Damien ALEXANDRE

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to