aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2009-06-11 13:12:04 +0000
committerAndreas Fischer <bantu@phpbb.com>2009-06-11 13:12:04 +0000
commit92b6e5400ea1024f3463866be70244eb1fe79a82 (patch)
tree18a0c1a327610c7c67afa55a0ccb9cedb0e6670d /phpBB/includes/functions_user.php
parent41a2f0fb03a433ad98d0c96acdd7215f1b94da60 (diff)
downloadforums-92b6e5400ea1024f3463866be70244eb1fe79a82.tar
forums-92b6e5400ea1024f3463866be70244eb1fe79a82.tar.gz
forums-92b6e5400ea1024f3463866be70244eb1fe79a82.tar.bz2
forums-92b6e5400ea1024f3463866be70244eb1fe79a82.tar.xz
forums-92b6e5400ea1024f3463866be70244eb1fe79a82.zip
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
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php6
1 files changed, 6 insertions, 0 deletions
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;