From 25b39b86aee250f2dc61947adf9b0465ea6cb4db Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 13 May 2019 15:12:05 +0530 Subject: [PATCH] FIX: reload the user record instead of fetching via email --- app/models/email_token.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/email_token.rb b/app/models/email_token.rb index 673c88432a1..4feea3fa5a1 100644 --- a/app/models/email_token.rb +++ b/app/models/email_token.rb @@ -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