You are here

function og_replies_mine in Organic groups 5

Same name and namespace in other branches
  1. 5.7 og.module \og_replies_mine()

File

./og.module, line 2957

Code

function og_replies_mine($comment, $recipient) {
  $node = node_load($comment->nid);

  // check each group that this node is in
  foreach ((array) $node->og_groups as $gid) {

    // check if recipient is an active member
    if (isset($recipient->og_groups[$gid]) && $recipient->og_groups[$gid]['is_active']) {

      // check if user is already getting this group notification
      if ($recipient->og_email || $recipient->og_groups[$gid]['mail_type']) {
        return TRUE;
      }
    }
  }
}