]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Also check for null, if the form fields are not given
authorRoland Haeder <roland@mxchange.org>
Wed, 13 Apr 2016 20:57:33 +0000 (22:57 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 13 Apr 2016 20:57:33 +0000 (22:57 +0200)
src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java

index 4f33d8446654935f795ed28fe8ca1be026c34230..418999e5a573019a02ff301a71d8ee49ddad6f2b 100644 (file)
@@ -316,7 +316,7 @@ public class PizzaAdminUserWebSessionBean implements PizzaAdminUserWebSessionCon
                } else if (this.userController.isEmailAddressRegistered(user)) {
                        // Email address is already used
                        throw new FaceletException(new EmailAddressAlreadyRegisteredException(user));
-               } else if ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty())) {
+               } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) {
                        // Empty password entered, then generate one
                        password = UserUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH);
                } else if (!this.isSamePasswordEntered()) {