about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-10-12 16:33:49 +0200
committerGitHub <noreply@github.com>2020-10-12 16:33:49 +0200
commit5e1364c448222c964faa469b6b5bfe9adf701c1a (patch)
treebf13de38f07f6a8ec4bdce9c6242c3c472bfddea /app/services
parentdc52a778e111a67a5275dd4afecf3991e279e005 (diff)
Add IP-based rules (#14963)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/app_sign_up_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/app_sign_up_service.rb b/app/services/app_sign_up_service.rb
index c9739c77d..e00694157 100644
--- a/app/services/app_sign_up_service.rb
+++ b/app/services/app_sign_up_service.rb
@@ -1,13 +1,13 @@
 # frozen_string_literal: true
 
 class AppSignUpService < BaseService
-  def call(app, params)
+  def call(app, remote_ip, params)
     return unless allowed_registrations?
 
     user_params           = params.slice(:email, :password, :agreement, :locale)
     account_params        = params.slice(:username)
     invite_request_params = { text: params[:reason] }
-    user                  = User.create!(user_params.merge(created_by_application: app, password_confirmation: user_params[:password], account_attributes: account_params, invite_request_attributes: invite_request_params))
+    user                  = User.create!(user_params.merge(created_by_application: app, sign_up_ip: remote_ip, password_confirmation: user_params[:password], account_attributes: account_params, invite_request_attributes: invite_request_params))
 
     Doorkeeper::AccessToken.create!(application: app,
                                     resource_owner_id: user.id,