]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Finished with event triggered when admin adds a new user + ignored some strings for...
authorRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 19:12:20 +0000 (21:12 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 19:12:20 +0000 (21:12 +0200)
src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java

index c3c82d7e2f3090ec055d6bfd7d0ab8b3a6cb0f34..d3239f9e53ce2affdab173986568438d23b81542 100644 (file)
@@ -43,6 +43,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.jusercore.events.user.AdminAddedUserEvent;
+import org.mxchange.jusercore.events.user.AdminUserAddedEvent;
 import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException;
 import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
@@ -329,8 +330,8 @@ public class PizzaAdminUserWebSessionBean implements PizzaAdminUserWebSessionCon
                }
 
                // The password should not be null and at least 5 characters long
-               assert (password != null) : "password is null";
-               assert (password.length() >= PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH) : "Password is not long enough.";
+               assert (password != null) : "password is null"; //NOI18N
+               assert (password.length() >= PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH) : "Password is not long enough."; //NOI18N
 
                // Encrypt password and set it
                user.setUserEncryptedPassword(UserUtils.encryptPassword(password));
@@ -347,6 +348,7 @@ public class PizzaAdminUserWebSessionBean implements PizzaAdminUserWebSessionCon
                }
 
                // Fire event
+               this.addedUserEvent.fire(new AdminUserAddedEvent(updatedUser));
 
                // Clear all
                this.clear();