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

Server Issue Post from deleted member assigned to new member?

Discussion in 'Resolved Bug Reports' started by yoghurtfarmer, Nov 4, 2010.

  1. yoghurtfarmer

    yoghurtfarmer Well-Known Member

    Something odd happened. There was a spammer that posted a thread. I deleted the account but left the thread intact.

    Appropriately, the post showed:


    However, today a new member signed up and now the post shows:

    New Member

    I looked at the database and it seems that the new member was assigned a user_id that's the same as the deleted user. I believe the expected behaviour is that deleted user_ids are skipped when someone new registers. The new member registered via facebook, so maybe the user_id bug only happens with Facebook Connect?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I spent some time playing with this and I am unable to reproduce the problem. But I don't have a facebook account to test that registration path. Are you able to reproduce this problem yourself?

    It certainly sounds like the user_id is being recycled. Maybe it's a problem with the database. You should check the definition of the xf_user.user_id field in the database to make sure it is autoincrementing and unique. Also check the auto_increment value of the table which specifies the next user_id to be used.
  3. yoghurtfarmer

    yoghurtfarmer Well-Known Member

    phpMyAdmin shows "auto-increment" being checked. Is there a unique setting?

    I scrolled through my list of users and there are some skipped user ids. Since I have deleted users in the past, I suspect the recycling is indeed unique to facebook registration. My facebook account is already registered on the forum so I can't quite test it. Is your forum online? If so I could register with my fb account.
  4. Mike

    Mike XenForo Developer Staff Member

  5. Mike

    Mike XenForo Developer Staff Member

    FB registration won't be related. It's likely dumb luck really.
  6. yoghurtfarmer

    yoghurtfarmer Well-Known Member

    Oh, sounds like that's the reason. I'm on shared hosting and the MySQL server did go down recently. Could this also cause thread and post ids to be recycled and will there be any huge problems down the line as a result of this?
  7. Mike

    Mike XenForo Developer Staff Member

    No, this is pretty much the only situation where it might be a problem. (And changing it is part of other bigger changes that may happen down the line.) It effectively is only an issue if there is some sort of "orphaned" data (the user_id associated with the post in this case).

Share This Page