]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 7 Jul 2017 22:49:34 +0000 (00:49 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 7 Jul 2017 22:55:41 +0000 (00:55 +0200)
- "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 <roland@mxchange.org>
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java

index 28bcde2c915bfd738570fec571fca3353938bd17..b13849c19e49513baca63ffb15420577c7b005f5 100644 (file)
@@ -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;