code: public CmsUser importUser(
          CmsDbContext dbc,
          String id,
          String name,
          String password,
          String firstname,
          String lastname,
          String email,
          int flags,
          long dateCreated,
          Map<String, Object> additionalInfos)
      throws CmsException {
  
          // no space before or after the name
          name = name.trim();
          // check the user name
          String userName = CmsOrganizationalUnit.getSimpleName(name);
          OpenCms.getValidationHandler().checkUserName(userName);
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(userName)) {
              throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_USER_1, userName));
          }
          // check the ou
          CmsOrganizationalUnit ou = readOrganizationalUnit(dbc, CmsOrganizationalUnit.getParentFqn(name));
  
          // check webuser ou
          if (ou.hasFlagWebuser() && ((flags & I_CmsPrincipal.FLAG_USER_WEBUSER) == 0)) {
              flags += I_CmsPrincipal.FLAG_USER_WEBUSER;
          }
          CmsUser newUser = getUserDriver(dbc).createUser(
              dbc,
              new CmsUUID(id),
              name,
              password,
              firstname,
              lastname,
              email,
              0,
              flags,
              dateCreated,
              additionalInfos);
          return newUser;
      }
docs: Creates a new user by import.<p>
  
  @param dbc the current database context
  @param id the id of the user
  @param name the new name for the user
  @param password the new password for the user (already encrypted)
  @param firstname the firstname of the user
  @param lastname the lastname of the user
  @param email the email of the user
  @param flags the flags for a user (for example <code>{@link I_CmsPrincipal#FLAG_ENABLED}</code>)
  @param dateCreated the creation date
  @param additionalInfos the additional user infos
  
  @return the imported user
  
  @throws CmsException if something goes wrong