X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fuser.ex;h=33f5e43fc4134ce5df3b20096ae50834f8d49d90;hb=551d80cc0186424d2c1653f917749adea16d9963;hp=f8827abeccafc8a411ba214df8aa6faf752ad135;hpb=2e2030ada8b9aa00936057d47260cd03d01d92be;p=akkoma diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index f8827abec..33f5e43fc 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2018 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Pleroma.User do use Ecto.Schema @@ -193,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)