More in this section

Forums / Developing with Sitefinity / Limits Blog Comments to Registered Users

Limits Blog Comments to Registered Users

2 posts, 0 answered
  1. Kevin
    Kevin avatar
    42 posts
    15 Mar 2005
    29 Sep 2009
    Link to this post
    Is there an obvious way to only allow registered/logged in users to add comments to blog entries (to avoid spam, etc.)?  I'm using a custom comments form on my regular pages (based on the PageComments example found in the forums here) and I just add the following code to only show to comment form when appropriate:


    base.AllowComments = HttpContext.Current.Profile.IsAnonymous ? false : true;


    Since I have no code behind for the blog pages, though, I'm not sure how to go about this?  It's probably a good option to add to the standard blog config window in the backend ("Registration required to comment", etc.).

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    29 Sep 2009
    Link to this post
    Hello Kevin,

    Please take a look at the following article - Add Registration for Blog Comments that describes how to achieve desired functionality.

    I hope this helps.

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered