docs: def create_user(email, profile="splunk", **kwargs):
      '''
      create a splunk user by name/email
  
      CLI Example:
  
          salt myminion splunk.create_user user@example.com roles=['user'] realname="Test User" name=testuser
      '''
  
      client = _get_splunk(profile)
  
      email = email.lower()
  
      user = list_users(profile).get(email)
  
      if user:
          log.error("User is already present %s", email)
          return False
  
      property_map = {}
  
      for field in ALLOWED_FIELDS_FOR_MODIFICATION:
          if kwargs.get(field):
              property_map[field] = kwargs.get(field)
  
      try:
          # create
          for req_field in REQUIRED_FIELDS_FOR_CREATE:
              if not property_map.get(req_field):
                  log.error("Missing required params %s",
                            ', '.join([six.text_type(k) for k in REQUIRED_FIELDS_FOR_CREATE]))
                  return False
  
          newuser = client.users.create(username=property_map['name'],
                                  password=_generate_password(email),
                                  roles=property_map['roles'],
                                  email=email,
                                  realname=property_map['realname'])
  
          _send_email(newuser.name, newuser.email)
  
          response = {}
          for field in ['email', 'password', 'realname', 'roles']:
              response[field] = newuser[field]
  
      except Exception as e:
          log.error("Caught exception %s", e)
          return False