Submitting an abuse report

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The following code example shows how to create an abuse report and store it in the system database.

 

[C#]

 

using System;

using CMS.SiteProvider;

using CMS.CMSHelper;

using CMS.GlobalHelper;

 

...

 

        // Create a new abuse report

        AbuseReportInfo abuseReport = new AbuseReportInfo();

 

        abuseReport.ReportURL = UrlHelper.GetAbsoluteUrl(UrlHelper.CurrentURL);

        abuseReport.ReportCulture = CMSContext.PreferredCultureCode;

 

        abuseReport.ReportTitle = "Sample abuse report";

        abuseReport.ReportComment = "Sample comment";

 

        abuseReport.ReportWhen = DateTime.Now;

        abuseReport.ReportStatus = AbuseReportStatusEnum.New;

        abuseReport.ReportSiteID = CMSContext.CurrentSiteID;

        

        // Save the info object to the database

        AbuseReportInfoProvider.SetAbuseReportInfo(abuseReport);

 

Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?api_submitting_an_abuse_report.htm