aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Wigginton <terrafrost@phpbb.com>2009-01-11 16:30:58 +0000
committerJim Wigginton <terrafrost@phpbb.com>2009-01-11 16:30:58 +0000
commit7da3e16ffd950f4eac02658168b393777737a23e (patch)
treede074e2e4cf9ba39ba5988876a60ab4a5089681a
parent1553a342920af998ce113e83a6a5a829f8fa5457 (diff)
downloadforums-7da3e16ffd950f4eac02658168b393777737a23e.tar
forums-7da3e16ffd950f4eac02658168b393777737a23e.tar.gz
forums-7da3e16ffd950f4eac02658168b393777737a23e.tar.bz2
forums-7da3e16ffd950f4eac02658168b393777737a23e.tar.xz
forums-7da3e16ffd950f4eac02658168b393777737a23e.zip
Fixed bug #40015 - ban list table isn't updated upon user deletion
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9249 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html3
-rw-r--r--phpBB/includes/functions_user.php7
2 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 9b6e9581f1..902d4cc472 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -87,6 +87,7 @@
<a name="v304"></a><h3>1.i. Changes since 3.0.4</h3>
<ul>
+ <li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
<li>[Fix] Missing read permission from calls to phpbb_chmod()</li>
</ul>
@@ -819,4 +820,4 @@
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index ea62a75306..3a3c5188bf 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -501,6 +501,11 @@ function user_delete($mode, $user_id, $post_username = false)
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
+ // Delete the user_id from the banlist
+ $sql = 'DELETE FROM ' . BANLIST_TABLE . '
+ WHERE ban_userid = ' . $user_id;
+ $db->sql_query($sql);
+
// Remove any undelivered mails...
$sql = 'SELECT msg_id, user_id
FROM ' . PRIVMSGS_TO_TABLE . '
@@ -3356,4 +3361,4 @@ function group_update_listings($group_id)
}
}
-?> \ No newline at end of file
+?>