News:

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

Main Menu

Merge users?

Started by Bob Mueller, February 09, 2010, 12:19:58 PM

Previous topic - Next topic

Bob Mueller

Running SMF 1.1.11.

Had a user quite a while back, with some 2900 posts. He moved on, forgot his password, etc. He came back recently and created a new account, and has made a few posts on that account.

Is there an easy way to merge the two user accounts? I haven't found a way in the Admin functions, so I'm assuming it's done in the database itself. Pointers or tips?
--
Bob M.

Sometimes it takes therapy to put the past behind you. Other times, it takes a 20 gallon trash bag and a couple of cinder blocks.

Chas Large

Hello Bob,

Sorry, it seems your post was missed. To merge two user accounts you need to run an SQL query on your database, so you'll need access to the database outside of SMF. Your host should have a database maintenance utility for such things.

When you can access the dB directly run the following query.

UPDATE smf_messages SET ID_MEMBER = 'ID', posterName = 'NAME' WHERE posterName = 'NAME';


where the ID is the user ID of the new account and the first NAME is the current name and the second NAME is the old username.

If this answers your question, please feel free to mark this topic as solved.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Bob Mueller

No problems - I'm slow checking back on things, and it's not a huge issue anyway.

UserID is 4597. New user is Jonathon, and old is Jon.

So I want to go to phpMyAdmin, and run this query:
UPDATE smf_messages SET ID_MEMBER = '4597', posterName = 'Jonathon' WHERE posterName = 'Jon';
--
Bob M.

Sometimes it takes therapy to put the past behind you. Other times, it takes a 20 gallon trash bag and a couple of cinder blocks.

Chas Large

Providing the ID is his NEW ID then yes, it should have the format like:

UPDATE smf_messages SET ID_MEMBER = 'his_new_member_id', posterName = 'his_new_username' WHERE posterName = 'his_old_username';
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

MNPaula

I just became the admin for a forum using this software and I need to merge several members as they were deleted.

Can someone please explain how I run a query and where I do it? Simple Machines is listed as our host but they aren't giving me any information, neither is SMF for free.

Thank you.

Chas Large

You need direct access to the database MNPaula, this is done using host provided software like PhPAdmin or some sort of MySql admin software. You then have a query browser in which you run the query as shown above.

Check in your host's control panel for an SQL management tool download or a link to a site where one can be downloaded.

You'll need details from the SMF Server Settings page, like dB name, password and location.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Bob Mueller

Chas, thanks for your help; that did the trick. I'm going to go ahead and mark this solved.  MNPaula, you should probably start your own thread for your situation.
--
Bob M.

Sometimes it takes therapy to put the past behind you. Other times, it takes a 20 gallon trash bag and a couple of cinder blocks.

Advertisement: