code: @POST
      @Produces(MediaType.APPLICATION_JSON)
      @Consumes(MediaType.APPLICATION_JSON)
      @Description("Creates a user.")
      public PrincipalUserDto createPrincipalUser(@Context HttpServletRequest req, final PrincipalUserDto userDto) {
          PrincipalUser remoteUser = validateAndGetOwner(req, null);
  
          validateResourceAuthorization(req, remoteUser, remoteUser);
          if (userDto == null) {
              throw new WebApplicationException("Cannot create a null user.", Status.BAD_REQUEST);
          }
  
          PrincipalUser user = new PrincipalUser(remoteUser, userDto.getUserName(), userDto.getEmail());
  
          copyProperties(user, userDto);
          user = _uService.updateUser(user);
          return PrincipalUserDto.transformToDto(user);
      }
docs: Creates a user.
  
  @param   req      The HTTP request.
  @param   userDto  The user to create.
  
  @return  The updated DTO for the created user.
  
  @throws  WebApplicationException  If an error occurs.