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 Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
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: 8372
Loc: Olympia, WA
There will be a merge tool builtin for the final 7.0 release wink
_________________________
StogieSmokers.com

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 Global Moderator 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: 8372
Loc: Olympia, WA
Yep. I had to merge like 300 users when I merged both forums on ubbcentral.
_________________________
StogieSmokers.com

Top
#311627 - 10/08/06 07:14 AM Re: Merge Users [Re: Rick]
Ian_W Global Moderator 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 
Who's Online
1 registered (arentzen), 26 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
nick1, Begbie, cenk, MATTO, DougMMcts
13362 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks