function simplenews_rules_simplenews_unsubscribe in Simplenews 8
Same name and namespace in other branches
- 8.2 simplenews_rules/simplenews_rules.module \simplenews_rules_simplenews_unsubscribe()
- 7.2 simplenews_rules/simplenews_rules.module \simplenews_rules_simplenews_unsubscribe()
- 3.x simplenews_rules/simplenews_rules.module \simplenews_rules_simplenews_unsubscribe()
Implements hook_simplenews_unsubscribe().
File
- simplenews_rules/
simplenews_rules.module, line 27 - Module file for Simpelnews rules integration.
Code
function simplenews_rules_simplenews_unsubscribe($subscriber, $subscription) {
$args = array(
'mail' => $subscriber->mail,
'newsletter' => simplenews_newsletter_load($subscription->newsletter_id),
);
rules_invoke_event_by_args('simplenews_rules_event_unsubscribe', $args);
}