function simplenews_rules_simplenews_subscribe in Simplenews 3.x
Same name and namespace in other branches
- 8.2 simplenews_rules/simplenews_rules.module \simplenews_rules_simplenews_subscribe()
- 8 simplenews_rules/simplenews_rules.module \simplenews_rules_simplenews_subscribe()
- 7.2 simplenews_rules/simplenews_rules.module \simplenews_rules_simplenews_subscribe()
Implements hook_simplenews_subscribe().
File
- simplenews_rules/
simplenews_rules.module, line 39 - Module file for Simplenews rules integration.
Code
function simplenews_rules_simplenews_subscribe($subscriber, $subscription) {
$args = array(
'mail' => $subscriber->mail,
'newsletter' => Newsletter::load($subscription->newsletter_id),
);
rules_invoke_event_by_args('simplenews_rules_event_subscribe', $args);
}