aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions_user.php6
2 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 0dbf238a3b..93b81b1997 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -98,6 +98,7 @@
<li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li>
<li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215 - Patch by bantu)</li>
<li>[Fix] Correctly apply the can change vote permission again. Regression intorduced in r9470. (Bug #45895)</li>
+ <li>[Fix] Also remove data from friend/foe table when deleting user. (Bug #45345 - Patch by nickvergessen)</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Feature] Backported 3.2 captcha plugins.</li>
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;