MyBB Community Forums

Full Version: Invalid argument supplied for foreach()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there!

I have a problem recently: I can no longer see my users.

How did this problem arise?

Well, I just wanted to reset auto_increment in users so everything would start from 1 again, because my userid was already at 17 - don't ask me why because I don't know myself. Could someone please help me with this error, please?

I would not like to lose the plugins that I have just about updated to my own liking.

Thanks for the help!  Heart
What MyBB version are you running?
I don't understand the obsession with having tidied table identifiers to such extend.
Be very careful when manipulating ID's. It could only make sense to modify uid in mybb_users on an empty forum.
A uid is tied to many other tables like threads, posts etc.

For a repair, get your recent registered user id from mybb_users (highest value) and set auto-increment to +1,
E.g. current user uid's in mybb_users: 1, 2, 3, 5, 7, 12, 13, 14, 22, 23
Set auto-increment to 24 to be safe.
Ensure there are no uid references to accounts with a uid higher than 23 in other tables (threads, posts, ratings, PM) to avoid coontent mismatches!

[ExiTuS]