aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/cache.php')
-rw-r--r--phpBB/includes/cache.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php
index 8d6e17a8df..01dcf5b722 100644
--- a/phpBB/includes/cache.php
+++ b/phpBB/includes/cache.php
@@ -354,6 +354,29 @@ class cache extends acm
return $parsed_items;
}
+
+ function obtain_disallowed_usernames(&$usernames)
+ {
+ if (($usernames = $this->get('disallowed_usernames')) === false)
+ {
+ global $db;
+
+ $sql = 'SELECT disallow_username
+ FROM ' . DISALLOW_TABLE;
+ $result = $db->sql_query($sql);
+
+ $usernames = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $usernames[] = utf8_clean_string(str_replace('%', '.*?', preg_quote($row['disallow_username'], '$#')));
+ }
+ $db->sql_freeresult($result);
+
+ $this->put('disallowed_usernames', $usernames);
+ }
+
+ return true;
+ }
}
?> \ No newline at end of file