2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

FIX invite redeem more robust

This commit is contained in:
Sam 2014-07-17 09:38:16 +10:00
parent 189b1c729a
commit d56d7866ff

View file

@ -10,7 +10,7 @@ InviteRedeemer = Struct.new(:invite, :username, :name) do
# If `invite_passthrough_hours` is defined, allow them to re-use the invite link
# to login again.
if invite.redeemed_at >= SiteSetting.invite_passthrough_hours.hours.ago
if invite.redeemed_at && invite.redeemed_at >= SiteSetting.invite_passthrough_hours.hours.ago
return invited_user
end