This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » General plug-ins » How to set default culture for sfGuard user?  (5) 1 Vote(s)
How to set default culture for sfGuard user? [message #102776] Mon, 19 July 2010 20:13 Go to next message
thomas2411  is currently offline thomas2411
Messages: 18
Registered: January 2009
Junior Member
Hi

If I add a profile to a user with some information, also a language for a user, how to set up default culture for a user based on a value from Profile model?

Symfony 1.4 sfGuard 4.0

[Updated on: Mon, 19 July 2010 20:14]


Wizualizacje
Absurd
Tomasz Ignatiuk Blog
Re: How to set default culture for sfGuard user? [message #102969 is a reply to message #102776 ] Fri, 23 July 2010 05:10 Go to previous messageGo to next message
alxkn  is currently offline alxkn
Messages: 126
Registered: June 2007
Senior Member
I have symfony 1.2.7 and this
default_culture:       name_of_your_culture  # Default user culture

in apps/frontend/config/settings.yml

works fine.


http://fmpsv.com/ --revolution in social networking
Re: How to set default culture for sfGuard user? [message #103030 is a reply to message #102969 ] Sat, 24 July 2010 13:22 Go to previous messageGo to next message
thomas2411  is currently offline thomas2411
Messages: 18
Registered: January 2009
Junior Member
I know this, but I meant something else. I log in with sfGuard plugin. Then recieve language from Profile (in database) and set this culture.


Wizualizacje
Absurd
Tomasz Ignatiuk Blog
Re: How to set default culture for sfGuard user? [message #103037 is a reply to message #103030 ] Sat, 24 July 2010 21:03 Go to previous message
alxkn  is currently offline alxkn
Messages: 126
Registered: June 2007
Senior Member
in this case you can set the language in layout using
$user_culture=your code to get it from profile
$this->getUser()->setCulture($user_culture);


http://fmpsv.com/ --revolution in social networking
Previous Topic:sfThumbnailPlugin PDF problem
Next Topic:sfJqueryReloadedPlugin ??
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software