summaryrefslogtreecommitdiff
path: root/modules/statistics.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/statistics.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/statistics.module')
-rw-r--r--modules/statistics.module9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index 9eaccd6fe..1c79db602 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -145,6 +145,15 @@ function statistics_menu($may_cache) {
return $items;
}
+/**
+ * Implementation of hook_user().
+ */
+function statistics_user($op, &$edit, &$user) {
+ if ($op == 'delete') {
+ db_query('UPDATE {accesslog} SET uid = 0 WHERE uid = %d', $user->uid);
+ }
+}
+
function statistics_access_log($aid) {
$result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = %d', $aid);
if ($access = db_fetch_object($result)) {