Register a user to a managed lab.

@param userName The name of the user.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the {@link ServiceResponse} object if successful.
2585
public Observable<ServiceResponse<Void>> registerWithServiceResponseAsync(String userName) {
        if (userName == null) {
            throw new IllegalArgumentException("Parameter userName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        final String registrationCode = null;
        RegisterPayload registerPayload = new RegisterPayload();
        registerPayload.withRegistrationCode(null);
        return service.register(userName, this.client.apiVersion(), this.client.acceptLanguage(), registerPayload, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
                @Override
                public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<Void> clientResponse = registerDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
481636
public User get(String name) {

        User user = (User) userList.get(name);

        if (user == null) {
            throw Error.error(ErrorCode.X_28501, name);
        }

        return user;
    }
164712
public void checkUserName(String userName) throws CmsIllegalArgumentException {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(userName)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(Messages.ERR_BAD_USERNAME_EMPTY_0, userName));
        }

        CmsStringUtil.checkName(userName, USERNAME_CONSTRAINTS, Messages.ERR_BAD_USERNAME_4, Messages.get());
    }
308408
@Programmatic
    public ApplicationUser findOrCreateUserByUsername(
            final String username) {
        // slightly unusual to cache a function that modifies state, but safe because this is idempotent
        return queryResultsCache.execute(new Callable<ApplicationUser>() {
            @Override
            public ApplicationUser call() throws Exception {
                final ApplicationUser applicationUser = findByUsername(username);
                if (applicationUser != null) {
                    return applicationUser;
                }
                return newDelegateUser(username, null, null);
            }
        }, ApplicationUserRepository.class, "findOrCreateUserByUsername", username);
    }
1234967
public E registerUser(E user, HttpServletRequest request) throws Exception {

        String email = user.getEmail();

        // check if a user with the email already exists
        E existingUser = dao.findByEmail(email);

        if (existingUser != null) {
            final String errorMessage = "User with eMail '" + email + "' already exists.";
            LOG.info(errorMessage);
            throw new Exception(errorMessage);
        }

        user = (E) this.persistNewUser(user, true);

        // create a token for the user and send an email with an "activation" link
        registrationTokenService.sendRegistrationActivationMail(request, user);

        return user;
    }
217619
public static aaauser[] get(nitro_service service, String username[]) throws Exception{
		if (username !=null && username.length>0) {
			aaauser response[] = new aaauser[username.length];
			aaauser obj[] = new aaauser[username.length];
			for (int i=0;i<username.length;i++) {
				obj[i] = new aaauser();
				obj[i].set_username(username[i]);
				response[i] = (aaauser) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}
259137
@POST
  @Path("/db/{authorizerName}/users/{userName}")
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @ResourceFilters(BasicSecurityResourceFilter.class)
  public Response createUser(
      @Context HttpServletRequest req,
      @PathParam("authorizerName") final String authorizerName,
      @PathParam("userName") String userName
  )
  {
    return resourceHandler.createUser(authorizerName, userName);
  }
1284001
public static Observable<? extends AVUser> logIn(String username, String password) {
    return logIn(username, password, internalUserClazz());
  }
1355315
public void setUserName(final String userName) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "UserName", userName);
        }
        _userName = userName;

    }
954962
public static systemuser get(nitro_service service, String username) throws Exception{
		systemuser obj = new systemuser();
		obj.set_username(username);
		systemuser response = (systemuser) obj.get_resource(service);
		return response;
	}
9375
public void registerService(String serviceName, String instanceName, String devname) throws DevFailed {
		databaseDAO.registerService(this, serviceName, instanceName, devname);
	}
880834
public OvhCustomerUser serviceName_dedicatedHorizon_customerUser_username_GET(String serviceName, String username) throws IOException {
		String qPath = "/horizonView/{serviceName}/dedicatedHorizon/customerUser/{username}";
		StringBuilder sb = path(qPath, serviceName, username);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhCustomerUser.class);
	}
1189972
private void validateInput(AuthenticationService authenticationService, String username) throws AuthenticationException {
        if (authenticationService == null) {
            throw new AuthenticationException("authenticationService cannot be null.");
        } else if (username == null) {
            throw new AuthenticationException("username cannot be null.");
        }
    }
974204
public static UsernameAttribute createUsernameAttribute(String username) {
		UsernameAttribute attribute = new UsernameAttribute();

		try {
			attribute.setUsername(username.getBytes("UTF-8"));
		} catch (UnsupportedEncodingException ueex) {
			throw new UndeclaredThrowableException(ueex);
		}
		return attribute;
	}
554157
public WebhookMessageBuilder setUsername(String username)
    {
        this.username = Helpers.isBlank(username) ? null : username;
        return this;
    }
741634
public IPerson getPerson(String username) {
        final IPerson rslt = new PersonImpl();
        rslt.setAttribute(IPerson.USERNAME, username);
        rslt.setID(userIdentityStore.getPortalUserId(username));
        rslt.setAttributes(personAttributeDao.getPerson(username).getAttributes());
        return rslt;
    }
187570
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
        return getSecurityComponents().userDetails.loadUserByUsername(username);
    }