createUserWithHttpInfo method

Future<Response> createUserWithHttpInfo(
  1. MmCreateUserRequest mmCreateUserRequest, {
  2. String? t,
  3. String? iid,
})

Create a user

Create a new user on the system. Password is required for email login. For other authentication types such as LDAP or SAML, auth_data and auth_service fields are required. ##### Permissions No permission required for creating email/username accounts on an open server. Auth Token is required for other authentication types such as LDAP or SAML.

Note: This method returns the HTTP Response.

Parameters:

  • MmCreateUserRequest mmCreateUserRequest (required): User object to be created

  • String t: Token id from an email invitation

  • String iid: Token id from an invitation link

Implementation

Future<Response> createUserWithHttpInfo(
  MmCreateUserRequest mmCreateUserRequest, {
  String? t,
  String? iid,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/users';

  // ignore: prefer_final_locals
  Object? postBody = mmCreateUserRequest;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (t != null) {
    queryParams.addAll(_queryParams('', 't', t));
  }
  if (iid != null) {
    queryParams.addAll(_queryParams('', 'iid', iid));
  }

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}