Reserve a few user names

These are all names that are used for domain.com/:route routes or projected to be.
This commit is contained in:
lain 2018-12-25 20:09:27 +01:00
commit 91724d160a
3 changed files with 44 additions and 0 deletions

View file

@ -197,6 +197,7 @@ defmodule Pleroma.User do
|> validate_confirmation(:password)
|> unique_constraint(:email)
|> unique_constraint(:nickname)
|> validate_exclusion(:nickname, Pleroma.Config.get([Pleroma.User, :restricted_nicknames]))
|> validate_format(:nickname, local_nickname_regex())
|> validate_format(:email, @email_regex)
|> validate_length(:bio, max: 1000)