From: Roland Häder Date: Fri, 7 Jul 2017 22:49:34 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8e1e83dd1e2a34024bca5044786b81ba714abcf1;p=jjobs-war.git Please cherry-pick: - "cached" beanHelper.contact locally so such "expensive" calls are reduced - and the instance has not changed between two calls anyway Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index 28bcde2c..b13849c1 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -227,7 +227,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J } else if (this.adminContactController.getFamilyName() == null) { // ... and again throw new NullPointerException("contactController.familyName is null"); //NOI18N - } else if (this.contactController.getFamilyName().isEmpty()) { + } else if (this.adminContactController.getFamilyName().isEmpty()) { // ... and again throw new IllegalArgumentException("contactController.familyName is empty"); //NOI18N } else if (this.adminContactController.getEmailAddress() == null) { @@ -241,13 +241,15 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J // Create new user instance User user = new LoginUser(); - // Set user name, CONFIRMED and INVISIBLE user.setUserName(this.getUserName()); user.setUserMustChangePassword(this.getUserMustChangePassword()); user.setUserAccountStatus(UserAccountStatus.CONFIRMED); user.setUserProfileMode(ProfileMode.INVISIBLE); + // Copy user locale + user.setUserLocale(this.localizationController.getLocale()); + // Init instance Contact userContact;