From 2fd131addc68f00875c6f085a970f914d7fee726 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 24 Jul 2015 16:20:57 +0200 Subject: [PATCH] Be good to prevent blocked people from actually posting.. ;-) --- uForum/Api/ForumController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uForum/Api/ForumController.cs b/uForum/Api/ForumController.cs index 0c9a8a5d..4b842933 100644 --- a/uForum/Api/ForumController.cs +++ b/uForum/Api/ForumController.cs @@ -22,6 +22,7 @@ using umbraco.BusinessLogic; using umbraco.cms.helpers; using Umbraco.Core; using Umbraco.Core.Logging; +using Umbraco.Web; using Umbraco.Web.Security; using Umbraco.Web.WebApi; @@ -44,7 +45,7 @@ namespace uForum.Api c.Created = DateTime.Now; c.ParentCommentId = model.Parent; c.TopicId = model.Topic; - c.IsSpam = c.DetectSpam(); + c.IsSpam = Members.GetCurrentMember().GetPropertyValue("blocked") || c.DetectSpam(); CommentService.Save(c); if (c.IsSpam) SpamChecker.SendSlackSpamReport(c.Body, c.TopicId, "comment", c.MemberId); @@ -162,7 +163,7 @@ namespace uForum.Api t.Score = 0; t.Answer = 0; t.LatestComment = 0; - t.IsSpam = t.DetectSpam(); + t.IsSpam = Members.GetCurrentMember().GetPropertyValue("blocked") || t.DetectSpam(); TopicService.Save(t); if (t.IsSpam)