summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-26 19:31:00 +0000
committerGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-26 19:31:00 +0000
commit5885925b0d2881277c22c6d70d86f1bc060fb133 (patch)
tree828d46033a71340a7edc2bc71133767e4b105920 /modules/node/node.module
parente01c325d4ff7adc07d552907f7fb7fdddc56f9b0 (diff)
downloadbrdo-5885925b0d2881277c22c6d70d86f1bc060fb133.tar.gz
brdo-5885925b0d2881277c22c6d70d86f1bc060fb133.tar.bz2
#53348, Handling of deleted/blocked user accounts, patch by jreyero and Zen
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index ec8a58180..ebe013b93 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -822,6 +822,16 @@ function node_search($op = 'search', $keys = null) {
}
}
+/**
+ * Implementation of hook_user().
+ */
+function node_user($op, &$edit, &$user) {
+ if ($op == 'delete') {
+ db_query('UPDATE {node} SET uid = 0 WHERE uid = %d', $user->uid);
+ db_query('UPDATE {node_revisions} SET uid = 0 WHERE uid = %d', $user->uid);
+ }
+}
+
function theme_node_search_admin($form) {
$output = form_render($form['info']);