diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-25 09:07:26 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-25 09:07:26 +0000 |
commit | 17f40511bf4df9dd46cd13cbd2c7802c49575783 (patch) | |
tree | 96b9183199fed320c786300f44767792ca1fa4da /phpBB/includes/functions_user.php | |
parent | 19bae65f4c79c7f50d71fd57bfff6ff1033ed84b (diff) | |
download | forums-17f40511bf4df9dd46cd13cbd2c7802c49575783.tar forums-17f40511bf4df9dd46cd13cbd2c7802c49575783.tar.gz forums-17f40511bf4df9dd46cd13cbd2c7802c49575783.tar.bz2 forums-17f40511bf4df9dd46cd13cbd2c7802c49575783.tar.xz forums-17f40511bf4df9dd46cd13cbd2c7802c49575783.zip |
Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10053 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index c562ac666f..cb3306745e 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -538,6 +538,17 @@ function user_delete($mode, $user_id, $post_username = false) $cache->destroy('sql', MODERATOR_CACHE_TABLE); + // Delete user log entries about this user + $sql = 'DELETE FROM ' . LOG_TABLE . ' + WHERE reportee_id = ' . $user_id; + $db->sql_query($sql); + + // Change user_id to anonymous for this users triggered events + $sql = 'UPDATE ' . LOG_TABLE . ' + SET user_id = ' . ANONYMOUS . ' + WHERE user_id = ' . $user_id; + $db->sql_query($sql); + // Delete the user_id from the zebra table $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' WHERE user_id = ' . $user_id . ' |