Announcement

Collapse
No announcement yet.

How to check for duplicate users after import

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to check for duplicate users after import

    I recently imported a phpbb2 and a vb3 into an already running vbulletin installation. It mostly went well, but I had a few users with duplicate usernames but different email addresses, so they weren't merged.

    I had to hunt down duplicate usernames and handle them on a case by case basis.

    Here is the query I ran to look for duplicate users, I thought I'd share it.
    Code:
    SELECT  DISTINCT (username
    ) AS user1, COUNT( username )  AS user1Count
    FROM user
    GROUP  BY username
    HAVING user1Count >1
    LIMIT 0 , 30
    After you run the query, user1 will hold the duplicated username and user1Count will hold the number of duplicates (usually 2).

    To resolve conflicts, go into the ACP, search for the duped user and rename one of them to a temporary name, i.e. if i have duplicate "Joe", i would make one of them "Joe1". You can then merge the accounts.

    Hope this helps someone, it would've helped me to have it here

    I'd love to know if this helps someone.

  • #2
    If the usernames are identical and the emails arn't then the imported one will be prepended with "imported_" so this will find them :

    Code:
    SELECT userid, username  FROM user WHERE `username` LIKE 'imported_%';
    I wrote ImpEx.

    Blog | Me

    Comment


    • #3
      believe it or not, that did not happen in this case when importing from vb3... trust me i have no reason to make this up.

      Comment


      • #4
        Originally posted by cruelio
        believe it or not, that did not happen in this case when importing from vb3... trust me i have no reason to make this up.
        I do, then it must be a bug
        I wrote ImpEx.

        Blog | Me

        Comment


        • #5
          Which I've just found and fixed !

          So now they are pre pended with imported_

          I wrote ImpEx.

          Blog | Me

          Comment


          • #6
            Glad to hear I'm not crazy

            Comment


            • #7
              Originally posted by cruelio
              Glad to hear I'm not crazy
              Well I didn't say that, just that I've fixed the bug
              I wrote ImpEx.

              Blog | Me

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X