mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10033] "Disallow usernames" does not check already disallowed names.
This commit is contained in:
commit
c63676e802
@ -56,6 +56,18 @@ class acp_disallow
|
|||||||
trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
|
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));
|
$sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
@ -233,13 +233,13 @@ $lang = array_merge($lang, array(
|
|||||||
|
|
||||||
// Disallow Usernames
|
// Disallow Usernames
|
||||||
$lang = array_merge($lang, array(
|
$lang = array_merge($lang, array(
|
||||||
'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it.',
|
'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *.',
|
||||||
'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character.',
|
'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character.',
|
||||||
'ADD_DISALLOW_TITLE' => 'Add a disallowed username',
|
'ADD_DISALLOW_TITLE' => 'Add a disallowed username',
|
||||||
|
|
||||||
'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit.',
|
'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit.',
|
||||||
'DELETE_DISALLOW_TITLE' => 'Remove a disallowed username',
|
'DELETE_DISALLOW_TITLE' => 'Remove a disallowed username',
|
||||||
'DISALLOWED_ALREADY' => 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.',
|
'DISALLOWED_ALREADY' => 'The name you entered is already disallowed.',
|
||||||
'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed.',
|
'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed.',
|
||||||
'DISALLOW_SUCCESSFUL' => 'The disallowed username has been successfully added.',
|
'DISALLOW_SUCCESSFUL' => 'The disallowed username has been successfully added.',
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user