FIX: reload the user record instead of fetching via email

This commit is contained in:
Arpit Jalan 2019-05-13 15:12:05 +05:30
parent e64ed9dbc1
commit 25b39b86ae

View File

@ -75,7 +75,9 @@ class EmailToken < ActiveRecord::Base
end
if user
return User.find_by_email(user.email) if Invite.redeem_from_email(user.email).present?
if Invite.redeem_from_email(user.email).present?
return user.reload
end
user
end
end