How can i get the userPreferences, being more specific the language a user select's in the profile window?, i am looking for information about the use of UserPreferencesManager, included in Jira 6.1.7 Api.
Community moderators have prevented the ability to post new answers.
Here's a sample if I understood correctly:
String userLocale = ComponentAccessor.getUserPreferencesManager().getExtendedPreferences(user).getString(PreferenceKeys.USER_LOCALE)
I have tried it, and it function well like you said, thanks for the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello, i have type the last answer and the result of userLocale in a local enviroment is "null". i have verify with debugger the field user and it is correct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The value will be null if the locale is equal to the default user locale. If that's the case try setting different locale and then see what will the code I've suggested will produce.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.