Current time: 05-23-2012, 04:04 AM Hello There, Guest! (LoginRegister)


Jump to the post that solved this thread.
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Merging deleted user into another user?
01-18-2012, 11:15 PM
Post: #1
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago Merging deleted user into another user?
Hey, so I have a few deleted user accounts on my forum and I was curious if there was a way to change them to actual accounts via phpMyAdmin. It's pretty annoying when I see their posts and they're set to 'Guest' (a disgruntled admin deleted them a long while ago). Can I change these accounts into an account that registered before they did?

Thanks for the help in advance!
Find all posts by this user
Quote this message in a reply
01-19-2012, 12:37 AM
Post: #2
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
I'm not sure there's something built in, but you could run this in phpmyadmin:

PHP Code:
UPDATE mybb_posts SET uid='new uid' WHERE uid'old uid' 
PHP Code:
UPDATE mybb_threads SET uid='new uid' WHERE uid'old uid' 

No guarantees on it working, though.

~Paul H.
[Image: HZbjvu]
Support PM's will be ignored.
(01-19-2012 12:45 AM)euantor Wrote:  That's caused by plugins being disabled I believe. Don't quote me on that though Wink
Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2012, 01:31 AM
Post: #3
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
But if the user is deleted there will not be a uid, right?
Find all posts by this user
Quote this message in a reply
01-19-2012, 01:45 AM (This post was last modified: 01-19-2012 01:46 AM by euantor.)
Post: #4
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
Correct. Use the same query as above, but try setting the "old uid" as blank or 0 (I can't remember how MyBB stores them for deleted users/guests).

Support Team

codiciousdeveloper

Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2012, 01:59 AM
Post: #5
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
You could do username, I believe that is still in the DB.

~Paul H.
[Image: HZbjvu]
Support PM's will be ignored.
(01-19-2012 12:45 AM)euantor Wrote:  That's caused by plugins being disabled I believe. Don't quote me on that though Wink
Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2012, 02:55 AM
Post: #6
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
How should the query look if I want to do it by username?
Find all posts by this user
Quote this message in a reply
02-16-2012, 09:43 PM
Post: #7
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
(01-19-2012 01:45 AM)euantor Wrote:  Correct. Use the same query as above, but try setting the "old uid" as blank or 0 (I can't remember how MyBB stores them for deleted users/guests).

Wouldn't this put all deleted users into the same account?

(01-19-2012 02:55 AM)cLutchh Wrote:  How should the query look if I want to do it by username?

Bump. And how would it work if the username is deleted/not actually there?
Find all posts by this user
Quote this message in a reply
02-22-2012, 07:41 PM
Post: #8
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
Hm... Undecided
Find all posts by this user
Quote this message in a reply
02-22-2012, 10:41 PM (This post was last modified: 02-22-2012 10:42 PM by Alan Shepperson.)
Post: #9
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
Run these queries in phpMyAdmin:

PHP Code:
UPDATE `mybb_threadsSET `uid` = 'X' WHERE `username` = 'Y';
UPDATE `mybb_postsSET `uid` = 'X' WHERE `username` = 'Y'

Where X is the new account ID and Y is the old username.

Then go to ACP >> Tools & Maintenance >> Recount & Rebuild and rebuild/recount the first 4 options.

-Alan Shepperson
[Image: help.gif] Support Technician


Vote for MyBB as the Best Forum Software of 2012!
Find all posts by this user
Quote this message in a reply
02-23-2012, 04:57 AM
Post: #10
Solved: 2 Months, 3 Weeks, 6 Days, 23 Hours, 6 Minutes, 52 Seconds ago RE: Merging deleted user into another user?
Worked like a charm, thank you very much!
Find all posts by this user
Quote this message in a reply
Jump to the post that solved this thread.
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication