mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
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
This commit is contained in:
@@ -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 . '
|
||||
|
Reference in New Issue
Block a user