I have a site where all users can post content. But I would like to have a way for users to subscribe to certain user or users only.
I need it at least for admin only? Is there a way to do that?

Comments

Anonymous’s picture

I solved it temporarly for users to get admin post only by adding 1 line of code. It is the one with comment at the end.

  // Build query to fetch desired nodes.
  $q = db_select('node', 'n');
  $q->fields('n', array('nid'));
  $q->condition('uid', 1);  // This is the line that I added
  $q->condition('status', 1);
  if (count($ntype) >= 1) {
    $q->condition('n.type', $ntype, 'IN');
  }
gisle’s picture

Status: Active » Closed (won't fix)

No, Notify does not have the ability to only notify about content from a certain user or role.

Such an ability is beyond the scope of Notify, which is supposed to be a lightweight module. If you want these features please consider one of the more advanced notification modules. This page gives you an overview of the available notifications modules and how they compare.

Your mod looks fine, but it is too narrow in scope to be included into the maintained version of the module.