You are here

function notifications_delete_subscription in Notifications 6

Same name and namespace in other branches
  1. 5 notifications.module \notifications_delete_subscription()
  2. 6.4 notifications.module \notifications_delete_subscription()
  3. 6.2 notifications.module \notifications_delete_subscription()
  4. 6.3 notifications.module \notifications_delete_subscription()

Delete subscription and clean up related data.

It also removes pending notifications related to that subscription

Parameters

$sid: Id of subscriptin to delete

9 calls to notifications_delete_subscription()
notifications_content_form_submit in notifications_content/notifications_content.pages.inc
Process generic form submission
notifications_custom_account_update in notifications_custom/notifications_custom.module
Update custom subscriptions for user account
notifications_form_unsubscribe_confirm_submit in ./notifications.pages.inc
Process form submission
notifications_multiple_delete_confirm_submit in ./notifications.manage.inc
Submit multiple delete from
notifications_page_unsubscribe in ./notifications.pages.inc
Menu callback for unsubscribe page

... See full list

File

./notifications.module, line 777
Notifications module

Code

function notifications_delete_subscription($sid) {
  foreach (array(
    'notifications',
    'notifications_fields',
    'notifications_queue',
  ) as $table) {
    db_query("DELETE FROM {" . $table . "} WHERE sid = %d", $sid);
  }
}