mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/10729] Update *_delete_user when user being deleted
PHPBB3-10729
This commit is contained in:
parent
1e0775a3da
commit
bef207e9b7
1 changed files with 12 additions and 0 deletions
|
@ -596,6 +596,18 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
|||
WHERE ' . $db->sql_in_set('message_edit_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Change user_id to anonymous for posts deleted by this user
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET post_delete_user = ' . ANONYMOUS . '
|
||||
WHERE ' . $db->sql_in_set('post_delete_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Change user_id to anonymous for topics deleted by this user
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_delete_user = ' . ANONYMOUS . '
|
||||
WHERE ' . $db->sql_in_set('topic_delete_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Delete user log entries about this user
|
||||
$sql = 'DELETE FROM ' . LOG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('reportee_id', $user_ids);
|
||||
|
|
Loading…
Add table
Reference in a new issue