import org.mxchange.jjobs.beans.BaseJobsController;
import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController;
import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController;
+import org.mxchange.jjobs.beans.user.JobsAdminUserWebRequestController;
import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
@Inject
private JobsAdminPhoneWebRequestController adminPhoneController;
+ /**
+ * Administrative user controller
+ */
+ @Inject
+ private JobsAdminUserWebRequestController adminUserController;
+
/**
* Contact instance
*/
// Set all fields: user
this.userController.setUserName(this.getUser().getUserName());
+ this.adminUserController.setUserName(this.getUser().getUserName());
}
@Override
// Throw exception
throw new FaceletException("Not same password entered"); //NOI18N
- } else if (this.userBean.ifUserNameExists(this.getUserName())) {
+ } else if ((!Objects.equals(user.getUserName(), this.getUserName())) && (this.userBean.ifUserNameExists(this.getUserName()))) {
// User name already exists
throw new FaceletException(new UserNameAlreadyRegisteredException(this.getUserName()));
} else if (this.isSamePasswordEntered()) {