X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fuser.ex;h=33f5e43fc4134ce5df3b20096ae50834f8d49d90;hb=d8cc96cb1f9e2a4e736f6830529e8aa9a5d289d8;hp=f8827abeccafc8a411ba214df8aa6faf752ad135;hpb=a3e33fa17767ccdc191cfa8a0b9cd602ce07871b;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)