diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2011-03-23 22:48:22 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2011-03-23 22:48:22 +0100 |
commit | 1564c01c38742037bf44f87c03c96384344fd17b (patch) | |
tree | e0c2e21a7968a983d380a6f554d7a5331e22e295 /phpBB/includes/acp | |
parent | 200c7e3c446aaa95397ac379f6eb2aa3b620ccd6 (diff) | |
download | forums-1564c01c38742037bf44f87c03c96384344fd17b.tar forums-1564c01c38742037bf44f87c03c96384344fd17b.tar.gz forums-1564c01c38742037bf44f87c03c96384344fd17b.tar.bz2 forums-1564c01c38742037bf44f87c03c96384344fd17b.tar.xz forums-1564c01c38742037bf44f87c03c96384344fd17b.zip |
[ticket/10033] "Disallow usernames" does not check already disallowed names.
PHPBB3-10033
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_disallow.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php index 9549955cc8..e2176b7bcd 100644 --- a/phpBB/includes/acp/acp_disallow.php +++ b/phpBB/includes/acp/acp_disallow.php @@ -56,6 +56,18 @@ class acp_disallow trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING); } + $sql = 'SELECT disallow_id + FROM ' . DISALLOW_TABLE . " + WHERE disallow_username = '" . $db->sql_escape($disallowed_user) . "'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + trigger_error($user->lang['DISALLOWED_ALREADY'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user)); $db->sql_query($sql); |