Commit b764ee81 authored by mmn's avatar mmn

Nickname::normalize now checks for path name collision too.

parent 352bef23
......@@ -118,6 +118,9 @@ class Nickname
if (!self::isCanonical($str)) {
throw new NicknameInvalidException();
}
if (!User::allowed_nickname($str)) {
throw new NicknameBlacklistException();
}
return $str;
}
......@@ -194,3 +197,12 @@ class NicknameTooLongException extends NicknameInvalidException
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.');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment