From 92b6e5400ea1024f3463866be70244eb1fe79a82 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 11 Jun 2009 13:12:04 +0000 Subject: Fix bug #45345 - Also remove data from friend/foe table when deleting user (patch by nickvergessen). Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9569 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'phpBB/includes') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 0345f039a3..48fb532d00 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -501,6 +501,12 @@ function user_delete($mode, $user_id, $post_username = false) $cache->destroy('sql', MODERATOR_CACHE_TABLE); + // Delete the user_id from the zebra table + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + WHERE user_id = ' . $user_id . ' + OR zebra_id = ' . $user_id; + $db->sql_query($sql); + // Delete the user_id from the banlist $sql = 'DELETE FROM ' . BANLIST_TABLE . ' WHERE ban_userid = ' . $user_id; -- cgit v1.2.1