Allow users to remove their emails if instance does not need email to register
This commit is contained in:
parent
6b1282a829
commit
198250dcef
5 changed files with 95 additions and 6 deletions
|
|
@ -2248,7 +2248,7 @@ defmodule Pleroma.User do
|
|||
def change_email(user, email) do
|
||||
user
|
||||
|> cast(%{email: email}, [:email])
|
||||
|> validate_required([:email])
|
||||
|> maybe_validate_required_email(false)
|
||||
|> unique_constraint(:email)
|
||||
|> validate_format(:email, @email_regex)
|
||||
|> update_and_set_cache()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue