updateUserActiveWithHttpInfo method

Future<Response> updateUserActiveWithHttpInfo(
  1. String userId,
  2. MmUpdateUserActiveRequest mmUpdateUserActiveRequest
)

Update user active status

Update user active or inactive status. Since server version 4.6, users using a SSO provider to login can be activated or deactivated with this endpoint. However, if their activation status in Mattermost does not reflect their status in the SSO provider, the next synchronization or login by that user will reset the activation status to that of their account in the SSO provider. Server versions 4.5 and before do not allow activation or deactivation of SSO users from this endpoint. ##### Permissions User can deactivate themselves. User with manage_system permission can activate or deactivate a user.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> updateUserActiveWithHttpInfo(
  String userId,
  MmUpdateUserActiveRequest mmUpdateUserActiveRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/active'.replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody = mmUpdateUserActiveRequest;

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

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

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