From facfe8aa6003cf0ef58cf11802cf6438c8c8a766 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 13 Apr 2016 22:57:33 +0200 Subject: [PATCH] Also check for null, if the form fields are not given --- .../beans/user/PizzaAdminUserWebSessionBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java index 4f33d844..418999e5 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java @@ -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()) { -- 2.39.5