Duplicate email address in user profile

In one of the user profiles, there is the exact same email address twice in the list of email addresses. The first entry is marked as “primary”. The second one is “unconfirmed”.

The user can neither remove the second address nor confirm it (there is an user with this address already…). Nor can I remove it (DELETE request gets 428 response).

I tried to search the database. The table user_emails only lists one entry. Any idea how this can happen and how to get it resolved?

1 Like

It might be that you have a corrupt index. What version of discourse and Postgres do you have?

Do you have social logins enabled? One possibility is that they tried to sign up with the email address, didn’t respond to the validation email, and then used social login.

I’d probably try to fix it at the rails console or perhaps directly in sql.

Other than it being confusing that the address shows twice, there is no actual problem, right? The user can log in, but has an extra address in their profile.

1 Like
  • Discourse 2.7.0.beta4 (33df4233c9)
  • Postgres 13 (dpkg says: 13.1-1.pgdg100+1)

Yes, they are. This user is not connected to any of them, so currently could not use it – to my understanding.

I tried, but could find a duplicate address in sql. user_emails shows only one row for this user, user_open_ids and user_associated_accounts have no entry. Any hint where to search?

That’s right. I’m worried it could be a symptom of a problem, that shows more severe symptoms later and could be fixed early.

1 Like