function simplenews_subscription_activate in Simplenews 7
Same name and namespace in other branches
- 7.2 includes/simplenews.admin.inc \simplenews_subscription_activate()
Callback function to (de-)activate subscriptions.
Parameters
$snids: Array of snid's to be activated.
$status: Status of the subscription (0, 1).
2 string references to 'simplenews_subscription_activate'
- hook_simplenews_subscription_operations in ./
simplenews.api.php - Return operations to be applied to subscriptions.
- simplenews_simplenews_subscription_operations in includes/
simplenews.admin.inc - Implements hook_simplenews_subscription_operations().
File
- includes/
simplenews.admin.inc, line 1213 - Newsletter admin, subscription admin, simplenews settings
Code
function simplenews_subscription_activate($snids, $status) {
foreach ($snids as $snid) {
$subscriber = simplenews_subscriber_load($snid);
$subscriber->activated = $status;
simplenews_subscriber_save($subscriber);
}
}