function notifications_custom_get_subscription in Notifications 6
Same name and namespace in other branches
- 6.4 notifications_custom/notifications_custom.module \notifications_custom_get_subscription()
 
Get user subscription for a custom one
Parameters
$type: Custom subscription type
$uid: User id
4 calls to notifications_custom_get_subscription()
- notifications_custom_account_update in notifications_custom/
notifications_custom.module  - Update custom subscriptions for user account
 - notifications_custom_form_alter in notifications_custom/
notifications_custom.module  - Implementation of hook_form_alter()
 - notifications_custom_user_form in notifications_custom/
notifications_custom.module  - Build user account form
 - notifications_custom_user_multiple_subscribe in notifications_custom/
notifications_custom.module  - User operations callback
 
File
- notifications_custom/
notifications_custom.module, line 347  - Custom notifications module
 
Code
function notifications_custom_get_subscription($type, $uid) {
  $subs = notifications_get_subscriptions(array(
    'uid' => $uid,
    'type' => $type,
  ));
  return $subs ? array_shift($subs) : NULL;
}