import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jusercore.container.login.UserLoginContainer;
-import org.mxchange.jusercore.events.user.AdminAddedUserEvent;
-import org.mxchange.jusercore.events.user.AdminUserAddedEvent;
+import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
+import org.mxchange.jusercore.events.user.add.AdminUserAddedEvent;
import org.mxchange.jusercore.events.user.update.AdminUpdatedUserDataEvent;
import org.mxchange.jusercore.events.user.update.AdminUserDataUpdatedEvent;
import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent;
// Throw exception
throw new FaceletException("Not same password entered"); //NOI18N
+ } else if (this.userBean.ifUserNameExists(this.getUserName())) {
+ // User name already exists
+ throw new FaceletException(new UserNameAlreadyRegisteredException(this.getUserName()));
} else if (this.isSamePasswordEntered()) {
// Same password entered, create container
if (UserUtils.ifPasswordMatches(new UserLoginContainer(user, this.getUserPassword()))) {