Disallow 'api' nickname

darcs-hash:20080909000650-7b5ce-c7eb990db81620b83201c0e361af9dfcdd9c2b89.gz
This commit is contained in:
Zach Copley 2008-09-08 20:06:50 -04:00
parent 2fcc9ff65f
commit 6eb84f0f03

View File

@ -110,7 +110,8 @@ class User extends DB_DataObject
# XXX: should already be validated for size, content, etc.
static $blacklist = array('rss', 'xrds', 'doc', 'main',
'settings', 'notice', 'user',
'search', 'avatar', 'tag', 'tags');
'search', 'avatar', 'tag', 'tags',
'api');
$merged = array_merge($blacklist, common_config('nickname', 'blacklist'));
return !in_array($nickname, $merged);
}