Closed (fixed)
Project:
Notifications
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2009 at 22:21 UTC
Updated:
28 Jun 2009 at 22:30 UTC
hello, i'm trying to add a notification to a user from another one programatically.
what i do is:
$subscription = array(
'type' => 'author',
'uid' => $account->uid,
'fields' => array('author' => $account->uid),
'send_method' => notifications_user_setting('send_method', $GLOBALS['user']),
'send_interval' => notifications_user_setting('send_interval', $GLOBALS['user']),
'event_type' => 'node',
);
notifications_save_subscription($subscription);
where $account is the user i want to follow. but it looks like i'm always getting a subscription added to __myself__
(I get a notification called 'Admin' etc...).
Comments
Comment #1
gunzip commentedok i was wrong and account was still pointing to mine.
(it was somewhat difficult to track how to add notifications programatically,
i didn't find it into the developer documentation)