Closed (fixed)
Project:
Notifications
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 May 2010 at 05:57 UTC
Updated:
24 May 2010 at 23:20 UTC
Hello everyone,
I have a content type called 'Announcements' as a OG Group Post and I want all users to automatically be subscribed to that content type of whatever group they sign up for. I made the following rule:
ON event User subscribes to group
Execute:
global $user;
$subscription = _notifications_subscription_defaults($account);
$subscription['uid'] = $account->uid;
$subscription['type'] = 'announcements';
$subscription['event_type'] = 'node';
$subscription['fields'] = array('$group' => $gid);
notifications_save_subscription($subscription);
The problem is, it subscribes the user to all content types in that group in addition to a new one: Unknown Mail Immediately active edit, drop
I must be doing something wrong here, but I can't figure it out!
Thanks in advance,
Tiuya
Comments
Comment #1
jose reyero commentedAnyway you should be able to create these subscriptions from OG subscriptions pages. Also you may like 'Custom Subscriptions' module in http://drupal.org/project/notifications_extra
The subscription type should be possibly 'grouptype' though others are possible too...