about summary refs log tree commit diff
path: root/app/controllers/auth/registrations_controller.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-02-12 22:24:14 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-02-12 22:24:14 +0100
commit67215692fc1764cb4311e4bbd1211d0cf38438bd (patch)
treeaf6bcb6c59f0475c3da2afcfc0eb7aa4fa8dce06 /app/controllers/auth/registrations_controller.rb
parent2f80a348c9de3de6dbf220f9e12d5906042b3f73 (diff)
Save IP address used for sign-up, not only sign-in (#10026)
Fixes #9995
Diffstat (limited to 'app/controllers/auth/registrations_controller.rb')
-rw-r--r--app/controllers/auth/registrations_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb
index f2a832542..ad7b1859f 100644
--- a/app/controllers/auth/registrations_controller.rb
+++ b/app/controllers/auth/registrations_controller.rb
@@ -28,6 +28,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
     resource.invite_code = params[:invite_code] if resource.invite_code.blank?
     resource.agreement   = true
 
+    resource.current_sign_in_ip = request.remote_ip if resource.current_sign_in_ip.nil?
     resource.build_account if resource.account.nil?
   end