You are here

function simplenews_rules_action_subscriber_delete in Simplenews 8

Same name and namespace in other branches
  1. 8.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_subscriber_delete()
  2. 7.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_subscriber_delete()
  3. 7 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_subscriber_delete()
  4. 3.x simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_action_subscriber_delete()

Action Implementation: Delete an email address from all Simplenews newsletters

File

simplenews_rules/simplenews_rules.rules.inc, line 235
Rules hooks for the Simplenews newsletter module.

Code

function simplenews_rules_action_subscriber_delete($args, $settings) {
  $subscriber = simplenews_subscriber_load_by_mail($args['mail']);
  if ($subscriber) {
    $subscriber
      ->delete();
  }
}