From 15d8efde2603fc0a81afea436156febb59c73495 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 24 Jun 2017 00:43:27 +0200 Subject: [PATCH] Please cherry-pick: - set missing user locale which is being taken from the currently set locale in localization controller MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../beans/user/AddressbookUserWebSessionBean.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java index c77ed045..33495b9c 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java @@ -35,6 +35,7 @@ import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; import org.mxchange.addressbook.beans.features.AddressbookFeaturesWebApplicationController; +import org.mxchange.addressbook.beans.localization.AddressbookLocalizationSessionController; import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent; @@ -84,6 +85,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp @Inject private AddressbookFeaturesWebApplicationController featureController; + /** + * Localization controller + */ + @Inject + private AddressbookLocalizationSessionController localizationController; + /** * Event being fired when user updated personal data */ @@ -519,9 +526,10 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp this.setUserPasswordRepeat(randomPassword); } - // Set user name and mode + // Set user name profile mode and locale user.setUserName(this.getUserName()); user.setUserProfileMode(this.getUserProfileMode()); + user.setUserLocale(this.localizationController.getLocale()); // Is multiple registration page if ((createContactData) || (!this.featureController.isFeatureEnabled("user_register_multiple_page"))) { //NOI18N -- 2.39.5