Fixed New User posts take over a different users posts

Tried to be as descriptive as possible in the title, but it is a bit hard to explain

Odd little problem on my site today.

I had a new user register for the site. In his introduction post, he stated that he noticed several other posts in the forum as being posted under his user name.

I run a small forum, so I know all the user names, and this was the first time this user or name or e-mail had been used.

I tracked the other posts that he was talking about. I did find a few old posts that had been posted by another user that were now changed to show as being posted by this user, like it took over the other users posts for a few threads.

The old threads were from May. This new user just registered today, but the posts from May now show as being posted by him.

Any thoughts??




XenForo moderator
Staff member
Hmm, that's interesting.

All posts show as being made by user ID 134, yet that user only registered today and there are posts from May 3 associated with the account.

I expect Mike will need to take a look at this one.

I "think" :confused: that I may have found the issue.

see if this makes sense-

I had a member that had not been active in a while. Actually his previous visit had been when I was still on vb4
So- he stops by, sees the site is now xenforo and thought that he had to re-register for the site. So he did, BUT he used a different e-mail from his original account.
I sent him a message to use his old account login, and that I would DELETE this new account that he created, which I did.
The old posts that are showing as the new user ID 134 where actually made by the account that I had deleted.

So- the this new user registers, and is assigned user ID134. which I would guess had been originally assigned to the user account that I had deleted above. So it repopulates those posts with this new user's information.

I dont think it is a bug- more like user error by me. I do not think that I deleted the threads when I deleted the old account :unsure:


XenForo developer
Staff member
Your last post confirmed what I thought - it involved user deletion.

Now normally, user IDs (any sequence ID actually) will never be reused, except in one fairly obscure situation: after a MySQL restart, the next sequence number will be the highest allocated number + 1. So in this case, since presumably no one registered between the last user being deleted and the MySQL server restart, the number got reused.

We'd need to make a pass on the data to move it to user 0 (guest) on user delete, though there likely will still be a few places where this edge case will appear. I expect it to be exceedingly rare.
Thanks Mike!

Its no big deal to my boards, as we are a small gaming clan, but thought it was odd. I appreciate you taking a look.