You are here

function Notifications_Object::user_subscriptions in Notifications 7

Get list of possible and existing subscriptions for user/object

Return value

Notifications_Subscription_List

File

./notifications.object.inc, line 203
Drupal Notifications Framework - Default class file

Class

Notifications_Object
Wrapper for Drupal objects

Code

function user_subscriptions($account = NULL) {
  $account = $account ? $account : $GLOBALS['user'];
  $subscriptions = $this
    ->subscribe_options($account);
  $subscriptions
    ->build_instances(array(
    'uid' => $account->uid,
  ));
  $subscriptions
    ->set_user($account);
  return $subscriptions;
}