if (!self::isCanonical($str)) {
throw new NicknameInvalidException();
}
+ if (!User::allowed_nickname($str)) {
+ throw new NicknameBlacklistException();
+ }
return $str;
}
Nickname::MAX_LEN);
}
}
+
+class NicknameBlacklistException extends NicknameInvalidException
+{
+ protected function defaultMessage()
+ {
+ // TRANS: Validation error in form for registration, profile and group settings, etc.
+ return _('Nickname is disallowed through blacklist or system path list.');
+ }
+}