}
@Override
- public String editUserData () {
+ public String changeUserData () {
// Get user instance
User user = this.adminHelper.getUser();
// 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()))) {