From e1f61f67b9e1ecef3547eaef118aa305566675ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 23 May 2016 09:48:59 +0200 Subject: [PATCH] set user's initial locale from given one 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 0a1a39cc..d583d847 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.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; +import org.mxchange.addressbook.beans.localization.AddressbookLocalizationSessionController; import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.beans.register.AddressbookUserRegisterWebSessionController; import org.mxchange.jcontacts.contact.Contact; @@ -81,6 +82,12 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp @Inject private AddressbookContactWebSessionController contactController; + /** + * Localization controller + */ + @Inject + private AddressbookLocalizationSessionController localizationController; + /** * Login bean (controller) */ @@ -441,7 +448,8 @@ public class AddressbookUserWebSessionBean extends BaseAddressbookController imp this.setUserPasswordRepeat(randomPassword); } - // Set user name and mode + // Set local, user name and mode + user.setUserLocale(this.localizationController.getLocale()); user.setUserName(this.getUserName()); user.setUserProfileMode(this.getUserProfileMode()); -- 2.39.5