• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Language Setting for user under SSO

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'd successfully integrated JForum into my web apps using SSO. Now I face a couple of issues and hopefully someone can shed some light on these:

- Since the SSO has turned on, when a user has successfully logged in, they will use the user profile page in my Apps instead of the default one (user/edit/3.page).
- The request parameter for language change does not work in a session after user logged in (e.g. forums/list.page?lang=ja_JP). This setting is in the individual user profile. However, I'd changed the profile page to my own page, so I'm wondering what is the simplest way to allow user to change language after logged in.


[originally posted on jforum.net by mesostructure]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For a logged in user, the I18n class uses the UserSession object stored in the SessionFacade cache. To change languages while a user is logged on, you'll have to do something like:



The language in the UserSession object is set from the information in the jforum_users table.

FWIW, the list function is the only action that takes the lang= parameter and this only sets it for the session if there is a language file that matches the requested abbreviation.

If I remember correctly, this was added so that anonymous users could be supplied with language options from a calling site.
[originally posted on jforum.net by monroe]
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic