} 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()) {