diff options
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index c9921cc6f0..af9e69d00c 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -137,6 +137,9 @@ function user_update_name($old_name, $new_name) { set_config('newest_username', $new_name, true); } + + // Because some tables/caches use username-specific data we need to purge this here. + $cache->destroy('sql', MODERATOR_CACHE_TABLE); } /** @@ -1472,20 +1475,6 @@ function validate_username($username, $allowed_username = false) } } - $sql = 'SELECT word - FROM ' . WORDS_TABLE; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - if (preg_match('#(' . str_replace('\*', '.*?', preg_quote($row['word'], '#')) . ')#i', $username)) - { - $db->sql_freeresult($result); - return 'USERNAME_DISALLOWED'; - } - } - $db->sql_freeresult($result); - return false; } |