Actually you do know the username. Just do a $this->getUser()->getUsername()
in your catch you could use this as key. You could put the generated menu at
the beginning of the login in the session.

It still feels a bit dirty. Isn't there a way to catch based on unique
combination of credentials? If users share the same set of credentials no
additional overhead is needed.

best regards,
  Nathan

---
nathan @ <http://twitter.com/nathan_gs> nathan.gs
<http://nathan.gs/?utm_source=mailing-list&utm_medium=email&utm_campaign=blog>


On Thu, Jan 7, 2010 at 7:56 PM, Kevin <kevinb...@gmail.com> wrote:

> The reason I am looking to do this is so I can cache the drop-down
> menu, it requires quite a few db calls and is pretty slow.  Since
> different users see different options in the menu based on their
> credentials I need a user-based cache.  By incorporating the username
> in the url I could accomplish this but a way without having their name
> in the url would be better.
>
> On Jan 7, 1:41 pm, Kevin <kevinb...@gmail.com> wrote:
> > I am building an intranet system and would like to have the user's
> > username at the beginning of the url: example.com/username/foo/bar.
> >
> > I was able to accomplish this by creating a custom routing class but I
> > am wondering if there is a better way, with filters or something... I
> > don't want to have to set every route to the custom class.
> >
> > Any ideas?
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "symfony users" group.
To post to this group, send email to symfony-us...@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.

Reply via email to