mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 02:35:51 +08:00
FIX invite redeem more robust
This commit is contained in:
parent
189b1c729a
commit
d56d7866ff
@ -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
|
# If `invite_passthrough_hours` is defined, allow them to re-use the invite link
|
||||||
# to login again.
|
# 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
|
return invited_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user