1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Can i combine 2 accounts?

Discussion in 'XenForo Questions and Support' started by Robby, Nov 24, 2011.

  1. Robby

    Robby Well-Known Member

    I have recently imported old members, is it possible to combine two accounts? So that the old posts of the member can combine with the new...
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    A XenForo to XenForo importer doesn't exist.
     
  3. Robby

    Robby Well-Known Member

    No that's not what i mean, i mean i have allready imported users but at the same time some users had created a new account. Can i combine those two accounts so that they merge...
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Oh, you mean merge two users.

    That's also not possible, but it has been suggested.

    You could have merged them during the import, if their user name or email address had been the same.
     
  5. Brandon Sheley

    Brandon Sheley Well-Known Member

    Is there still no way to merge accounts?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Still nothing. Though you can run queries to reassign threads and posts by user_id.

    Code:
    UPDATE xf_post
    SET user_id = new_user_id
    WHERE username = 'old username';
    
    UPDATE xf_thread
    SET user_id = new_user_id
    WHERE username = 'old username';
    
    Then run this to rebuild their post count:

    http://xenforo.com/community/resources/rebuild-user-post-counts-query.363/
     
  7. Brandon Sheley

    Brandon Sheley Well-Known Member

    woohoo, that works for me
    thanks Jake! :)

    hmm.. it didn't work :(
    I still have 2 users, one with 200 post and one with 100
    there should be one account with 300
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Did you rebuild the user post counts? Do the posts themselves reflect the change?
     
  9. Brandon Sheley

    Brandon Sheley Well-Known Member

    I did, I didn't look
    I know there are still 2 member profiles, and the post count on the member page is off

    I'll check

    nope, showing old username
    I'll try again

    do there need to be ticks around the user id?

    SET user_id = 'new_user_id';
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    No ticks around the user_id.

    You can change the username too with these queries:

    Code:
    UPDATE xf_post
    SET user_id = new_user_id, username = 'new username'
    WHERE username = 'old username';
    
    UPDATE xf_thread
    SET user_id = new_user_id, username = 'new username'
    WHERE username = 'old username';
    
     
    Brandon Sheley likes this.
  11. Brandon Sheley

    Brandon Sheley Well-Known Member

    wouldn't I need?
    Code:
    SET user_id = new_user_id, username = 'new username'
    WHERE user_id = old_user_id, username = 'old username';
    I'm just not seeing any changed and it's still showing 200 post on the old ID in mysql

    thanks for the help
     
  12. DRE

    DRE Well-Known Member

    I had to learn this after I accidentally deleted a member. Unfortunately you lose likes and other stuff.
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The old username is enough for the where condition. Or you can change the condition to check the old user_id. But you shouldn't need both.
     
  14. Kevin

    Kevin Well-Known Member

    Only if you ended up in the weird scenario where you have the same user name assigned to two different user IDs. As Jake said, as long as the user name is truly unique then it is enough for the query.
     
  15. snoopy5

    snoopy5 Well-Known Member

    Hi

    I have a the same issue with one user and 2 accounts. I tried all the SQL code above, but it does not work. What else could I try?
     
  16. Divvens

    Divvens Well-Known Member

    What version of XenForo are you using? 1.2 introduced easy way to merge users.
     
  17. Liam W

    Liam W Well-Known Member

    That post is over a year old :p

    Liam
     
    Robby and Amaury like this.
  18. Divvens

    Divvens Well-Known Member

    Really? I saw it in the "New Posts" tab and responded to the latest comment thinking it was new... aah my bad.
     
  19. Brogan

    Brogan XenForo Moderator Staff Member

    That's because Liam W replied to it a minute before you did but then realised it was an old thread so deleted his post, making it look like it was you who necroed it.
     
    Brandon Sheley, Amaury and Divvens like this.
  20. Afra

    Afra Member

    I am using xenforo 1.3.3. Please tell me how can I merge two admin accounts in a single account? I couldnt find any option in Admin CP.
    Thanks
     

Share This Page