S
S
Sergey Evstigneev2015-11-20 19:17:59
Yii
Sergey Evstigneev, 2015-11-20 19:17:59

How to get rid of duplicate users during registration?

For example. User registered via mail and later registered via oauth (eg Twitter). In this case, we get 2 profiles of one user (2 users in the database). How to merge users and profiles?
It may be worth adding protection against such cases and adding the ability to merge profiles to the user. Has anyone encountered a similar problem? How did they decide?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Kudinov, 2015-11-20
@Frostealth

It is possible when registering through the social. check the network by email: if a user with this email is already registered, then display a message about the need to authorize on the site through the form and link the social account. networks with his profile.
If the user has different email addresses, then nothing can be done.

O
Optimus, 2015-11-20
Pyan @marrk2

No way, only when registering via oauth do the second stage where you ask for an e-mail, but by this time you will already have a user in the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question