From: Roland Häder Date: Fri, 23 Jun 2017 22:43:27 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=15d8efde2603fc0a81afea436156febb59c73495;p=addressbook-war.git Please cherry-pick: - set missing user locale which is being taken from the currently set locale in localization controller Signed-off-by: Roland Häder --- 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