function simplenews_rules_action_unsubscribe in Simplenews 7.2
Same name and namespace in other branches
- 8.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_unsubscribe()
- 8 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_unsubscribe()
- 7 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_unsubscribe()
- 3.x simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_unsubscribe()
Action Implementation: Unsubscribe an e-mail adress to a Simplenews newsletter.
File
- simplenews_rules/
simplenews_rules.rules.inc, line 213 - Rules hooks for the Simplenews newsletter module.
Code
function simplenews_rules_action_unsubscribe($args, $settings) {
if ($args['language'] == LANGUAGE_NONE) {
$args['language'] = NULL;
}
$confirmation = simplenews_rules_map_confirmation($args);
// Pass the call forward.
simplenews_unsubscribe($args['mail'], $args['tid'], $confirmation, $args['source'], $args['language']);
}