News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Re: Merge 2 Users

Started by Novice, June 29, 2017, 08:08:21 PM

Previous topic - Next topic

Novice

Could someone tell me if or how I could do this running PHP 5.4 on a GoDaddy server using SMF 2.0.14.

I tried using this on a live test site and it failed due to syntax error. I'm not a coder and I'm not afraid of MySQL. I just don't know the correct syntax to restore everything to the new user_id. If an annotated version of:

Any and all assistance would be enormously great!

Quote from: Informatics on April 04, 2008, 12:49:27 PM
Assuming that first ID is 1 and the second is 2. And we are want to merge 2 to 1.

1. Updating the ID poster to all messages

UPDATE smf_messages SET ID_MEMBER=1 WHERE ID_MEMBER=2

2. Updating Personal Messages

UPDATE smf_personal_messages SET ID_MEMBER_FROM=1 WHERE ID_MEMBER_FROM=2

3. Updating Personal Messages Recipients

UPDATE smf_pm_recipients SET ID_MEMBER=1 WHERE ID_MEMBER=2

4. Polling

UPDATE smf_polls SET ID_MEMBER=1 WHERE ID_MEMBER=2

5. Themes

UPDATE smf_themes SET ID_MEMBER=1 WHERE ID_MEMBER=2

6. Topics

UPDATE smf_topics SET ID_MEMBER_STARTED=1 WHERE ID_MEMBER_STARTED=2
UPDATE smf_topics SET ID_MEMBER_UPDATED=1 WHERE ID_MEMBER_UPDATED=2


If you wondering about this, dont do it...


Shambles

Probably better to start a fresh thread mate, rather than necro-bumping a solved one.

Illori

under forum maintenance -> members in the admin panel there is a function built in to merge accounts.

Arantor

That's only there for posts when the second account has been deleted, and immediately after, the find/repair errors needs to run too.

Gwenwyfar

#4
Considering all the trouble it would be to merge accounts in the database (and that if you don't mess everything up), the closest you'll get is deleting one account and then adding the posts of the deleted account into the second. This will only merge posts, but if you need profile data you could copy that manually.

(Now I'm hoping no one will come tell me that this also not recommended despite being a core feature because I've done this to many users that come back and create a new one, as well as some other cases of guest posts... :P)
"It is impossible to communicate with one that does not wish to communicate"

br360

Take a look at this mod; as it should do what you are looking for without you having to go into the database- http://www.smfhacks.com/index.php?topic=9064.0

Advertisement: