From 74f16bf3772710703fe61164db59f6cdc48a11cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 13 May 2016 14:57:58 +0200 Subject: [PATCH] added parameter 'createContactData' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../register/PizzaUserRegisterWebSessionBean.java | 4 ++-- .../beans/user/PizzaUserWebSessionBean.java | 2 +- .../beans/user/PizzaUserWebSessionController.java | 13 +++---------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java index 748ad89e..98593a22 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java @@ -119,7 +119,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme } // Get user instance - User user = this.userController.createUserInstance(); + User user = this.userController.createUserInstance(true); // Is the user already used? if (null == user) { @@ -193,7 +193,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme } // Get user instance - User user = this.userController.createUserInstance(); + User user = this.userController.createUserInstance(false); // First check if user is not null and user name is not used + if same email address is entered if (null == user) { diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java index 154e63e5..097f02e7 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java @@ -389,7 +389,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz } @Override - public User createUserInstance () { + public User createUserInstance (final boolean createContactData) { // Trace message //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("{0}.createUserInstance: CALLED!", this.getClass().getSimpleName())); diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java index 7d127568..001bea12 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionController.java @@ -19,7 +19,6 @@ package org.mxchange.pizzaapplication.beans.user; import java.io.Serializable; import java.util.List; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; import org.mxchange.jusercore.events.login.UserLoggedInEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; @@ -43,14 +42,6 @@ public interface PizzaUserWebSessionController extends Serializable { */ public static final Integer MINIMUM_PASSWORD_LENGTH = 5; - /** - * Observes events being fired when an administrator has added a new - * contact. - *

- * @param event Event being fired - */ - void afterAdminAddedContact (final AdminAddedContactEvent event); - /** * Event observer for newly added users by adminstrator *

@@ -167,9 +158,11 @@ public interface PizzaUserWebSessionController extends Serializable { /** * Creates an instance from all properties *

+ * @param createContactData Whether contact data should be created + *

* @return A user instance */ - User createUserInstance (); + User createUserInstance (final boolean createContactData); /** * Creates a user instance for login phase -- 2.39.5