how to enable comments only to subscribed users I'm creating a site for events where people can subscribe themselves to a single one.
Now, I'm using Node Registration module to allow users to subscribe. I would like to know if it is possible to enable comments of a particular event only to users who are members of it. Is there a module to do this? I tried with rules module but i couldn't...
Here is a programmatic way to do this, add this code to your custom module

NOTE: 

In the following code my content type name is article, change it to yours.

Also this code can not handle functionality for anonymous user as I couldn find a way to track if anonymous user is already registered or not.

/**
  * Helper function to check if user is registered to a given event node or node.
 */
function check_if_user_is_registered($node, $uid) {
   $return = FALSE;
   $registrations = node_registration_load_multiple(FALSE, array(
      'uid' =&gt; $uid,
      'nid' =&gt; $node-&gt;nid,
      'cancelled' =&gt; 0,
    ));
  if(is_array($registrations)) {
    foreach($registrations as $registration) {
      if($registration-&gt;author_uid == $uid) {
        $return = TRUE;
      }
    }
  }
  return $return;
}

/**
  *  Implements hook_node_load().
 */
function MYMODULENAME_node_load($nodes, $types) {
  global $user;
  foreach ($nodes as $node) {
    if($node-&gt;type == "article") {
      $access = check_if_user_is_registered($node,$user-&gt;uid);
      if(!$access) {
       $node-&gt;comment = 0; // to close comments
      }   
    } 
  }
}