开发者

Drupal Notifications API: notifications_user_get_subscriptions

开发者 https://www.devze.com 2023-01-22 09:47 出处:网络
This is the signature per Acquia\'s documentation: notific开发者_如何学Pythonations_user_get_subscriptions($uid, $event_type,

This is the signature per Acquia's documentation:

notific开发者_如何学Pythonations_user_get_subscriptions($uid, $event_type, 
      $oid, $object = NULL, $refresh = FALSE)

I have used this method before to get node-level subscriptions for a user. I cannot figure out what to pass for parameter 4 if I want to get subscriptions for a specific content type only. This call returns all content type subscription:

notifications_user_get_subscriptions($author->uid, 'node', 'type');

What should parameter 4 be for this? The 'type' is simply 'forum' in the database, but passing the string 'forum' does not work.


Until there is an answer to this question, I resorted to iterating through the results and testing the 'type' field. I posted the solution here.

0

精彩评论

暂无评论...
验证码 换一张
取 消