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

vb import

Discussion in 'XenForo Questions and Support' started by ankurs, Aug 8, 2011.

  1. ankurs

    ankurs Well-Known Member

    do userid's change after import ?

    if it does change, is it possible to keep old userids ? by changing some import code
  2. Brogan

    Brogan XenForo Moderator Staff Member

    User IDs are created sequentially from 1, so yes, they do change.
  3. ankurs

    ankurs Well-Known Member

    is it possible to keep it same ? with some code modification ?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I expect so.

    You will need to edit the importer .php files to achieve that.

    I'll have to leave it to someone else to answer how though as that's not an area I know much about.
  5. Floris

    Floris Guest

    Every table (relevant to this topic) has a UNIQUE auto-increment field.

    vBulletin and XenForo both do.

    If you have 5 people register, and you delete 4 of them, the next unique auto incremented number is 6, the next that registers gets 6.

    If that's the case in vBulletin and you import a user into xenforo, then the first one is still there, then the next one is unique auto incremented id number 2. not 6. So old 6, becomes new 2.

    To customize this to your needs you need to customize the script to say "ignore whatever xenforo already has, import 6 as 6, .." the consequences of this are unknown to me.

    a userid means nothing to the end user, their names are still the same.
  6. ankurs

    ankurs Well-Known Member

    i am going to import on a fresh xf installation, so same userids imported isnt going to happen

    so this is possible ? with code modification in importer code of import users
    i have a backend script which uses userid & changing that will break lot of things ; so changing userid isnt a option to me
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Can't you update the script to use the new user IDs?
  8. Floris

    Floris Guest

    You can consider updating the script to support a usergroup, and in XenForo have a secondary usergroup you add these users to. That way it's dynamic and only have to change the usergroupid may it ever change.

    select * from xf_user where usergroupid=x; (or whatever the query would be)
  9. ankurs

    ankurs Well-Known Member


    if i do the existing userid in applications on 3rd party will break
  10. Floris

    Floris Guest

    Then I hope you find a developer of xenforo addons or custom scripts to volunteer recode the vb importer, or perhaps build a budget to elance.com find someone.
  11. ankurs

    ankurs Well-Known Member

    do i need to recode the whole importer or just the user import ? i hope its just the user part
  12. Floris

    Floris Guest

    I am not familiar with the vBulletin import script for XenForo beyond using it with great success.

Share This Page