You are here

function subscriptions_user_delete in Subscriptions 2.0.x

Same name in this branch
  1. 2.0.x subscriptions.module \subscriptions_user_delete()
  2. 2.0.x subscriptions.module.old.php \subscriptions_user_delete()
Same name and namespace in other branches
  1. 7 subscriptions.module \subscriptions_user_delete()

Implements hook_ENTITY_TYPE_delete().

2 calls to subscriptions_user_delete()
subscriptions_user_cancel in ./subscriptions.module
Implements hook_user_cancel().
subscriptions_user_cancel in ./subscriptions.module.old.php
Implements hook_user_cancel().

File

./subscriptions.module, line 31
Module file for the basic Subscriptions framework.

Code

function subscriptions_user_delete(UserInterface $user) {
  \Drupal::database()
    ->delete('subscriptions_user')
    ->condition('uid', $user
    ->id())
    ->execute();
  \Drupal::database()
    ->delete('subscriptions_last_sent')
    ->condition('uid', $user
    ->id())
    ->execute();
}