You are here

public static function Notifications_Subscription::delete_subscription in Notifications 7

Delete subscription and clean up related data, included the static cache It also removes pending notifications related to that subscription

Parameters

$sid: Subscription object or sid or array of sids of subscription/s to delete

6 calls to Notifications_Subscription::delete_subscription()
notifications_account_form_unsubscribe_confirm_submit in notifications_account/notifications_account.pages.inc
Process unsubscribe form submission
notifications_multiple_delete_confirm_submit in ./notifications.pages.inc
Submit multiple delete from
notifications_save_subscription in ./notifications.module
Update or create subscription
Notifications_Subscription::delete in ./notifications.subscription.inc
Delete from db
Notifications_Subscription::delete_multiple in ./notifications.subscription.inc
Delete multiple subscriptions and clean up related data (pending notifications, fields).

... See full list

File

./notifications.subscription.inc, line 857
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

public static function delete_subscription($sid) {
  $result = db_delete('notifications_subscription')
    ->condition('sid', $sid)
    ->execute();
  db_delete('notifications_subscription_fields')
    ->condition('sid', $sid)
    ->execute();
  return $result;
}