summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php
index 0e7fd5447..e735457f9 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -83,4 +83,12 @@ class User extends DB_DataObject
' WHERE id = ' . $this->id;
return $this->query($qry);
}
+
+ function allowed_nickname($nickname) {
+ # XXX: should already be validated for size, content, etc.
+ static $blacklist = array('rss', 'xrds', 'doc', 'main',
+ 'settings', 'notice', 'user');
+ $merged = array_merge($blacklist, common_config('nickname', 'blacklist'));
+ return !in_array($nickname, $merged);
+ }
}