]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 25 Sep 2022 15:32:59 +0000 (17:32 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 25 Sep 2022 15:35:35 +0000 (17:35 +0200)
- alsways use full-qualified access, means: `this.foo` and not just `foo`

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java

index 93b2d0469f6f482953ddff15e970366fc2fd47bf..b4e8252af8efa6c4068250ee67e09a000307af7a 100644 (file)
@@ -263,7 +263,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaBean implements Pizza
 
                // Is the user name or email address used already?
                // @TODO Add password length check
-               if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (userListController.isUserNameRegistered(newUser))) {
+               if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (this.userListController.isUserNameRegistered(newUser))) {
                        // User name is already used
                        throw new FaceletException(new UserNameAlreadyRegisteredException(newUser));
                } else if ((this.getContact() == null) && (this.contactController.isEmailAddressRegistered(newUser.getUserContact()))) {
@@ -317,7 +317,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaBean implements Pizza
                // Now, that all is set, call EJB
                if (this.getContact() instanceof Contact) {
                        // Fire event
-                       userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser));
+                       this.userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser));
                } else {
                        // Fire event
                        this.addedUserEvent.fire(new AdminAddedUserEvent(updatedUser));
@@ -432,9 +432,9 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaBean implements Pizza
                        this.setUserPasswordRepeat(null);
 
                        // Not same password entered
-                       this.showFacesMessage("form_edit_user:userPassword", "ADMIN_USER_PASSWORD_REPEAT_DIFFERENT"); //NOI18N
-                       return ""; //NOI18N
-               } else if ((!Objects.equals(this.getUser().getUserName(), this.getUserName())) && (this.userBean.ifUserNameExists(this.getUserName()))) {
+                       this.showFacesMessage("form_edit_user:userPassword", "ADMIN_USER_PASSWORD_REPEAT_DIFFERENT", FacesMessage.SEVERITY_INFO); //NOI18N
+                       return;
+               } else if ((!Objects.equals(user.getUserName(), this.getUserName())) && (this.userBean.ifUserNameExists(this.getUserName()))) {
                        // Clear all fields
                        this.clear();