We normally call user_from_email to find a user based on email, or create one if not. That function in turn calls query_user_by_email, which can take a parameter to also return deleted users. But that flag is not set when calling user_from_email. That means, if there is a deleted user, and we look for it, it will say no user exist and try to create a new user, but then fail due to duplicate emails in index.
We normally call
user_from_email
to find a user based on email, or create one if not. That function in turn callsquery_user_by_email
, which can take a parameter to also return deleted users. But that flag is not set when calling user_from_email. That means, if there is a deleted user, and we look for it, it will say no user exist and try to create a new user, but then fail due to duplicate emails in index.