function notifications_custom_get_subscription in Notifications 6.4
Same name and namespace in other branches
- 6 notifications_custom/notifications_custom.module \notifications_custom_get_subscription()
Get user subscription for a custom one or subscription type if not available
Parameters
$type: Custom subscription type
$account: User account
$return_template: Return subscription template if not found for this user
2 calls to notifications_custom_get_subscription()
- notifications_custom_account_update in notifications_custom/
notifications_custom.module - Update custom subscriptions for user account
- notifications_custom_user_multiple_subscribe in notifications_custom/
notifications_custom.module - User operations callback. Bulk subscribe multiple accounts
File
- notifications_custom/
notifications_custom.module, line 377 - Custom notifications module
Code
function notifications_custom_get_subscription($type, $account, $return_template = FALSE) {
if ($subscription = notifications_custom_build_subscription($type)) {
$subscription
->set_account($account);
return $subscription
->get_instance(array(
'uid' => $subscription->uid,
), $return_template);
}
}