public Task <CMResponse> DeleteUser(CMUser user) { CMRequestOptions opts = new CMRequestOptions(); opts.SetCredentials(user.Credentials); return(APIService.Request(this.Application, "account", HttpMethod.Delete, null, opts)); }
/// <summary> /// You may submit requests to change user passwords through the API. /// Use this method instead of password reset if the user knows their current password and simply wishes to change it. /// </summary> /// <param name="user">Original user with current credentials prior to change</param> /// <param name="newPassword"></param> public Task <CMResponse> ChangePassword(CMUser user, string newPassword) { Dictionary <string, string> data = new Dictionary <string, string>(); data["password"] = newPassword; CMRequestOptions opts = new CMRequestOptions(); opts.SetCredentials(user.Credentials); return(APIService.Request(this.Application, "account/password/change", HttpMethod.Post, CMSerializer.ToStream(data), opts)); }