code: public CmsUser importUser(
          CmsRequestContext context,
          String id,
          String name,
          String password,
          String firstname,
          String lastname,
          String email,
          int flags,
          long dateCreated,
          Map<String, Object> additionalInfos)
      throws CmsException, CmsRoleViolationException {
  
          CmsUser newUser = null;
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
  
          try {
              checkRole(dbc, CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParentOrganizationalUnit(name)));
              newUser = m_driverManager.importUser(
                  dbc,
                  id,
                  CmsOrganizationalUnit.removeLeadingSeparator(name),
                  password,
                  firstname,
                  lastname,
                  email,
                  flags,
                  dateCreated,
                  additionalInfos);
  
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(
                      Messages.ERR_IMPORT_USER_7,
                      new Object[] {
                          name,
                          firstname,
                          lastname,
                          email,
                          new Integer(flags),
                          new Date(dateCreated),
                          additionalInfos}),
                  e);
          } finally {
              dbc.clear();
          }
  
          return newUser;
      }
docs: Creates a new user by import.<p>
  
  @param context the current request context
  @param id the id of the user
  @param name the new name for the user
  @param password the new password for the user
  @param firstname the first name of the user
  @param lastname the last name 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
  @throws CmsRoleViolationException if the  role {@link CmsRole#ACCOUNT_MANAGER} is not owned by the current user.