Skip to content

Commit

Permalink
Trackable IP address fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasknoepfle committed Feb 18, 2020
1 parent 3846d47 commit d9b9553
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,19 @@ def can_sell?

# hashes the ip-addresses which are stored by devise :trackable
def last_sign_in_ip= value
super Digest::MD5.hexdigest(value)
if value.present?
super Digest::MD5.hexdigest(value)
else
super
end
end

def current_sign_in_ip= value
super Digest::MD5.hexdigest(value)
if value.present?
super Digest::MD5.hexdigest(value)
else
super
end
end

# FastBill: this method checks if a user already has fastbill profile
Expand Down

0 comments on commit d9b9553

Please sign in to comment.