mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
Better this way :D
git-svn-id: file:///svn/phpbb/trunk@7660 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
93c91c4a91
commit
c7853e2a4e
2 changed files with 2 additions and 2 deletions
|
@ -394,7 +394,7 @@ class cache extends acm
|
||||||
$usernames = array();
|
$usernames = array();
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$usernames[] = utf8_clean_string(str_replace('%', '.*?', preg_quote($row['disallow_username'], '$#')));
|
$usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#'));
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
|
@ -1381,7 +1381,7 @@ function validate_username($username, $allowed_username = false)
|
||||||
|
|
||||||
foreach ($bad_usernames as $bad_username)
|
foreach ($bad_usernames as $bad_username)
|
||||||
{
|
{
|
||||||
if (preg_match('#^' . str_replace('#', '\#', $bad_username) . '#', $clean_username))
|
if (preg_match('#^' . $bad_username . '#', $clean_username))
|
||||||
{
|
{
|
||||||
return 'USERNAME_DISALLOWED';
|
return 'USERNAME_DISALLOWED';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue