docs: def cli(env, username, email, password, from_user, template, api_key):
      """Creates a user Users.
  
      :Example: slcli user create my@email.com -e my@email.com -p generate -a
      -t '{"firstName": "Test", "lastName": "Testerson"}'
  
      Remember to set the permissions and access for this new user.
      """
  
      mgr = SoftLayer.UserManager(env.client)
      user_mask = ("mask[id, firstName, lastName, email, companyName, address1, city, country, postalCode, "
                   "state, userStatusId, timezoneId]")
      from_user_id = None
      if from_user is None:
          user_template = mgr.get_current_user(objectmask=user_mask)
          from_user_id = user_template['id']
      else:
          from_user_id = helpers.resolve_id(mgr.resolve_ids, from_user, 'username')
          user_template = mgr.get_user(from_user_id, objectmask=user_mask)
      # If we send the ID back to the API, an exception will be thrown
      del user_template['id']
  
      if template is not None:
          try:
              template_object = json.loads(template)
              for key in template_object:
                  user_template[key] = template_object[key]
          except ValueError as ex:
              raise exceptions.ArgumentError("Unable to parse --template. %s" % ex)
  
      user_template['username'] = username
      if password == 'generate':
          password = generate_password()
  
      user_template['email'] = email
  
      if not env.skip_confirmations:
          table = formatting.KeyValueTable(['name', 'value'])
          for key in user_template:
              table.add_row([key, user_template[key]])
          table.add_row(['password', password])
          click.secho("You are about to create the following user...", fg='green')
          env.fout(table)
          if not formatting.confirm("Do you wish to continue?"):
              raise exceptions.CLIAbort("Canceling creation!")
  
      result = mgr.create_user(user_template, password)
      new_api_key = None
      if api_key:
          click.secho("Adding API key...", fg='green')
          new_api_key = mgr.add_api_authentication_key(result['id'])
  
      table = formatting.Table(['Username', 'Email', 'Password', 'API Key'])
      table.add_row([result['username'], result['email'], password, new_api_key])
      env.fout(table)