Partial revert 3f90b0be

Partial revert 3f90b0be
This commit is contained in:
Developer 2021-02-28 18:09:36 -05:00
parent 10ec03f28b
commit 444f9a156b
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
resource.locale = I18n.locale
resource.agreement = true
resource.current_sign_in_ip = request.headers['True-Client-IP'] || request.remote_ip
resource.current_sign_in_ip = request.remote_ip
resource.build_account if resource.account.nil?
end

View File

@ -170,7 +170,7 @@ class User < ApplicationRecord
self.current_sign_in_at = new_current
old_current = current_sign_in_ip
new_current = request.headers['True-Client-IP'] || request.remote_ip
new_current = request.remote_ip
self.last_sign_in_ip = old_current || new_current
self.current_sign_in_ip = new_current
@ -234,7 +234,7 @@ class User < ApplicationRecord
def activate_session(request)
session_activations.activate(session_id: SecureRandom.hex,
user_agent: request.user_agent,
ip: request.headers['True-Client-IP'] || request.remote_ip).session_id
ip: request.remote_ip).session_id
end
def exclusive_session(id)