function notifications_delete_subscription in Notifications 6.2
Same name and namespace in other branches
- 5 notifications.module \notifications_delete_subscription()
- 6.4 notifications.module \notifications_delete_subscription()
- 6 notifications.module \notifications_delete_subscription()
- 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
8 calls to notifications_delete_subscription()
- notifications_content_form_submit in notifications_content/
notifications_content.pages.inc - Process generic form submission
- 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
- notifications_save_subscription in ./
notifications.module - Update or create subscription
File
- ./
notifications.module, line 806 - 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);
}
}