Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connected accounts : why the data of the first account is deleted and not merged ? #13

Open
MaxjTechno opened this issue Oct 22, 2013 · 10 comments

Comments

@MaxjTechno
Copy link

When I want to connect an account to an existing one, the following message is displayed :

*The selected logins will be associated with your current profile and their initial profiles will be permanently deleted. Reputation points belonging to these profiles will not be migrated, and previous activity will be marked as annonymous.*

Why do I loose the points, the profile, and everything belonging to the first account ?
Isn't it possible to merge the 2 accounts instead of deleting the first one ? (making his posts as "anonymous" ....)
Isn't it possible to update some qa_tables using the first userid in order to mantain his own data ?
Or is there any issue that I do not see ?
I think it's not correct to delete the first user's data when he just want to have a second way of logging into q2a. It should be possible to mantain his data.
If it's an enhancement request, I vote for it ! :-)

@alixandru
Copy link
Owner

No, it's true, the first account is deleted. Technically it should be possible, but it might interfere with other plugins, for example if they store references of the user accounts being deleted.

@MaxjTechno
Copy link
Author

I reopen it (mistake)

@MaxjTechno MaxjTechno reopened this Oct 22, 2013
@alixandru
Copy link
Owner

Deleting the account is the safest way to go, but merging would be indeed a good enhancement. Will look into this.

@MaxjTechno
Copy link
Author

You say that it might interphere with other plugins : are you thinking about "custom" tables or standard "q2a" tables ?
Because if these plugins use "custom" tables it's their risk .....

I think it would be great if your plugin allowed this merge too....

@MaxjTechno
Copy link
Author

Hello,
are there any plans to implement this feature ? :-)
(merging and not deleting)

ps
I do not want to push you, just to know it.... :-)
thanks !

@alixandru
Copy link
Owner

Well, I don't know what to say. I don't think I want to take all the risk this change involves.

Here is why. The core code of q2a does have a delete_user function, which my plugin makes use of, so deleting a user account is a safe operation. However, there's no move_activity/move_points/merge_users function or anything similar, so until now, there's no safe way to do this. And attempting to merge 2 users in the code of a plugin might work fine for now, in the current version of q2a, but might not work at all, or even worse, leave data in an inconsistent state in future versions. This is why I'm reluctant in implementing this.

I understand this functionality might be important for you and your users, so this is why I will be keeping this ticket open and I will try to find a solution. The path I would go would be first to get a merge_users type of function in the core q2a, and then to implement this functionality in the plugin, based on that core code. I will have to so some research though, before I can propose that to Gideon, so it will need some time.

@MaxjTechno
Copy link
Author

Instead of modifying the existing account, isn't it possible to attach to it the new account ?

@alixandru
Copy link
Owner

There's no support for that in Q2A, out-of-the-box. There's no way to link 2 user accounts together (2 entries from qa_users table); it is only possible to link an user account (qa_users) to multiple login methods (qa_user_login), and this is how my plugin works. But when there are 2 separate user accounts (in qa_users table), they count as different entities and all other existing data (posts, comments, etc) make references to them. There's no way to attach one user to another this way, as they are standalone entities.

I hope this makes sense.

@alixandru
Copy link
Owner

@MaxjTechno
Copy link
Author

Thanks, it would be great to have this feature.
I've posted also my enhancement request here :
http://www.question2answer.org/qa/31514/what-do-you-want-in-question2answer-1-7#31517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants