You are here

function simplenews_user_delete in Simplenews 7.2

Same name and namespace in other branches
  1. 8.2 simplenews.module \simplenews_user_delete()
  2. 8 simplenews.module \simplenews_user_delete()
  3. 7 simplenews.module \simplenews_user_delete()
  4. 3.x simplenews.module \simplenews_user_delete()

Implements hook_user_delete().

File

./simplenews.module, line 1162
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_user_delete($account) {

  // Delete subscription when account is removed.
  $subscriber = simplenews_subscriber_load_by_mail($account->mail);
  if ($subscriber) {
    simplenews_subscriber_delete($subscriber->snid);
  }
}