php forum
php mysql forum
php mysql smarty
 
Topic Options
#311534 - 09/18/06 06:56 PM Merge Users
MattyJ Offline
Coder

Registered: 05/11/99
Posts: 788
Loc: Wisconsin
One of the most needed mods for me, is the ability to merge two user accounts, assigning one of them as primary, and deleting the second when the merge process is completed. At one time, there was a hack for this (a couple, actually), but it would be a great thing to get rolled into the 'core' code at some time.

Thanks!

Matt R.
_________________________
--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/

Top
#311539 - 09/19/06 05:25 PM Re: Merge Users [Re: MattyJ]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Yeah, would be nice in the core. I believe Ian is working on merge script, I've got the basic commands you can use in your control panel's mysql command box tho:


Update posts:
Php Code:

UPDATE ubbt_POSTS SET USER_ID = '387' WHERE USER_ID = '9734' 

UPDATE ubbt_TOPICS SET USER_ID = '387' WHERE USER_ID = '9734' 

UPDATE ubbt_TOPICS SET TOPIC_LAST_POSTER_NAME = 'AllenAyres' WHERE TOPIC_LAST_POSTER_NAME = 'AllenAyres_dup1' 

UPDATE ubbt_TOPICS SET TOPIC_LAST_POSTER_ID = '387' WHERE TOPIC_LAST_POSTER_ID = '9734' 
 


Update Post count:
Php Code:

UPDATE ubbt_USER_PROFILE SET USER_TOTAL_POSTS = '24080' WHERE USER_ID = "387"
 



Update PM's:
Php Code:

UPDATE ubbt_PRIVATE_MESSAGE_POSTS SET USER_ID = '387' WHERE USER_ID = '9734' 

UPDATE ubbt_PRIVATE_MESSAGE_TOPICS SET USER_ID = '387' WHERE USER_ID = '9734' 

UPDATE ubbt_PRIVATE_MESSAGE_USERS SET USER_ID = '387' WHERE USER_ID = '9734' 
 


If I am going backwards and using the _dup1 acct instead of the more recent acct, I'll use this to update the name after deleting the other acct:
Php Code:

UPDATE ubbt_USERS SET USER_LOGIN_NAME = 'Scream' WHERE USER_ID = '8986' 
 


I believe that covers it, if I've missed something, let me know smile
_________________________
- Allen wavey
- What Drives You?

Top
#311543 - 09/20/06 08:06 AM Re: Merge Users [Re: AllenAyres]
MattyJ Offline
Coder

Registered: 05/11/99
Posts: 788
Loc: Wisconsin
Thanks Allen!

I'll start cleaning up my site... the fun part, of course, is trying to track down all the duplicate accounts... but that's another story. smile

_________________________
--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/

Top
#311563 - 09/25/06 03:49 PM Re: Merge Users [Re: MattyJ]
Rick Offline
Guru

Registered: 05/11/99
Posts: 8373
Loc: Olympia, WA
There will be a merge tool builtin for the final 7.0 release wink
_________________________
UBB.threads Developer

Top
#311564 - 09/25/06 04:21 PM Re: Merge Users [Re: Rick]
MattyJ Offline
Coder

Registered: 05/11/99
Posts: 788
Loc: Wisconsin
Oh, you cannot imagine how that brightens my day!!! smile

Thank you!!!
_________________________
--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/

Top
#311605 - 10/03/06 08:12 AM Re: Merge Users [Re: MattyJ]
MattyJ Offline
Coder

Registered: 05/11/99
Posts: 788
Loc: Wisconsin
FYI: I've been testing this on my site and it seems to be working with no issues! The key is identifying the account that the others need to be merged into. Then, transfer any profile values (manually) from the 'old' account into the new one, and when that's done, run the 'Merge User' function, which actually does the merge and blasts (deletes) the 'old' one.

What a time saver! Thanks Rick!
_________________________
--------------------
Matt Reinfeldt
http://www.mattreinfeldt.com/

Top
#311616 - 10/07/06 05:20 AM Re: Merge Users [Re: Rick]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Originally Posted By: Rick
There will be a merge tool builtin for the final 7.0 release wink


Did this make it to the final?
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#311618 - 10/07/06 10:58 AM Re: Merge Users [Re: Ian_W]
Rick Offline
Guru

Registered: 05/11/99
Posts: 8373
Loc: Olympia, WA
Yep. I had to merge like 300 users when I merged both forums on ubbcentral.
_________________________
UBB.threads Developer

Top
#311627 - 10/08/06 07:14 AM Re: Merge Users [Re: Rick]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Thx - wasn't sure if you used a script or a built in part of threads.
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks