mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 11:53:13 +00:00
parent
0a4caa89c3
commit
43c61bca60
|
@ -76,7 +76,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def account_params
|
def account_params
|
||||||
params.permit(:username, :email, :password, :agreement)
|
params.permit(:username, :email, :password, :agreement, :locale)
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_enabled_registrations
|
def check_enabled_registrations
|
||||||
|
|
|
@ -4,7 +4,7 @@ class AppSignUpService < BaseService
|
||||||
def call(app, params)
|
def call(app, params)
|
||||||
return unless allowed_registrations?
|
return unless allowed_registrations?
|
||||||
|
|
||||||
user_params = params.slice(:email, :password, :agreement)
|
user_params = params.slice(:email, :password, :agreement, :locale)
|
||||||
account_params = params.slice(:username)
|
account_params = params.slice(:username)
|
||||||
user = User.create!(user_params.merge(created_by_application: app, password_confirmation: user_params[:password], account_attributes: account_params))
|
user = User.create!(user_params.merge(created_by_application: app, password_confirmation: user_params[:password], account_attributes: account_params))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue