David Taylor 820564826e
FIX: Ensure that login does not fail for users with invite records (#15647)
In the unlikely, but possible, scenario where a user has no email_tokens, and has an invite record for their email address, login would fail. This commit fixes the `Invite` `user_doesnt_already_exist` validation so that it only applies to new invites, or when changing the email address.

This regressed in d8fe0f4199b5bb44fa79fa489586b4029289242c (based on `git bisect`)
2022-01-20 10:54:38 +00:00
..
2022-01-08 23:39:46 +01:00