function user_delete_node_delete in User Delete 5
Same name and namespace in other branches
- 6 user_delete.module \user_delete_node_delete()
Copy of node_delete() whithout access check and drupal_set_message(). see http://api.drupal.org/api/function/node_delete/5
1 call to user_delete_node_delete()
- user_delete_submit in ./
user_delete.module - Deal with the user/content after form submission
File
- ./
user_delete.module, line 311 - User delete - Let users delete their own account.
Code
function user_delete_node_delete($nid) {
$node = node_load($nid);
db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);
db_query('DELETE FROM {node_revisions} WHERE nid = %d', $node->nid);
// Call the node-specific callback (if any):
node_invoke($node, 'delete');
node_invoke_nodeapi($node, 'delete');
// Clear the cache so an anonymous poster can see the node being deleted.
cache_clear_all();
// Remove this node from the search index if needed.
if (function_exists('search_wipe')) {
search_wipe($node->nid, 'node');
}
//drupal_set_message(t('%title has been deleted.', array('%title' => $node->title)));
watchdog('content', t('@type: deleted %title.', array(
'@type' => t($node->type),
'%title' => $node->title,
)));
}