MyBB Community Forums

Full Version: Changing uid is possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.

My board was hacked twice, one deleted my admin user, the other changed some templates to redirect to a turkish site.

Now, i've upgrade to latest mybb. To restore my admin user, i added a normal user with same name first and then made him admin again (with direct mysql modification).

Everything works now, except that my old admin posts don't link to my new admin user anymore.
I tried to change the UID back to the old one, the posts link fine then, but i cannot login anymore Sad

What can i do?

Clear your cookies and see if you can login again.
Well, i fixed it another way: i changed the uid of all my previous posts from 0 to the new uid.
The uid field from what I understand about Mybb's coding(which isn't a lot but still) is that it when you install Mybb, your account's uid is 1 not 0 which would explain why the posts weren't linked together.

Do I have that right?
Simulationcity Wrote:The uid field from what I understand about Mybb's coding(which isn't a lot but still) is that it when you install Mybb, your account's uid is 1
Yes that is correct
Simulationcity Wrote:not 0 which would explain why the posts weren't linked together.

Do I have that right?
I don't understand why the posts would have a UID of 0 (unless they were posted by a guest).
if you can get into your ACP do a MySQL Maintenance. It should get the posts and match them with th uid, IF the current uid is the same as the uid used before when the posts were posted. I think.. Try it and find out, Nothing bad can really come from doing that.
DennisTT Wrote:I don't understand why the posts would have a UID of 0 (unless they were posted by a guest).
If you delete a user all posts made by this user are set to the UID 0.