AccountController: Don't explicitly ask to keep users unconfirmed.

Confirmation is set in User.register_changeset based on the config
settings.
This commit is contained in:
lain 2020-07-29 11:47:03 +02:00
commit c25c21dd22
3 changed files with 84 additions and 13 deletions

View file

@ -100,7 +100,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
def create(%{assigns: %{app: app}, body_params: params} = conn, _params) do
with :ok <- validate_email_param(params),
:ok <- TwitterAPI.validate_captcha(app, params),
{:ok, user} <- TwitterAPI.register_user(params, need_confirmation: true),
{:ok, user} <- TwitterAPI.register_user(params),
{:ok, token} <- Token.create_token(app, user, %{scopes: app.scopes}) do
json(conn, OAuthView.render("token.json", %{user: user, token: token}))
else