This PR addresses an issue where existing users' logins would break if they were invited via the CSV import tool.
Previously, we checked for the invitation_accepted_at field when deciding whether to re-invite an existing user. But this field is nil for users who created their accounts before the invite system existed. To address this oversight, I've added another check for sign_in_count > 0, so someone who has successfully signed in before won't be re-invited.
How to test
Tell me you're about to test this so I can turn on the COVE staging service worker.
What this PR does
This PR addresses an issue where existing users' logins would break if they were invited via the CSV import tool.
Previously, we checked for the
invitation_accepted_at
field when deciding whether to re-invite an existing user. But this field isnil
for users who created their accounts before the invite system existed. To address this oversight, I've added another check forsign_in_count > 0
, so someone who has successfully signed in before won't be re-invited.How to test