MyBB Community Forums

Full Version: user ids
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As i have been deleting alot of spam accounts, the userids have gone up to high numbers like 18234 or something, now if i ran a merge from mybb to mybb would the user ids all become sequential again so starting with me as uid 1 and the final member being uid 525 or however many members there are.
(2013-03-04, 09:19 PM)adbrad Wrote: [ -> ]As i have been deleting alot of spam accounts, the userids have gone up to high numbers like 18234 or something, now if i ran a merge from mybb to mybb would the user ids all become sequential again so starting with me as uid 1 and the final member being uid 525 or however many members there are.

you would need a script to to do this as the user table has the UID field set as auto increment
so you would have to reassign values to the UID field and then reset the auto increment value.
to do this remove the unwanted users then produce a script to renumber your allowed users and either within the script reset the next autoindex value or use PHPmyadmin to do it via a structure edit
ALTER TABLE mybb_users AUTO_INCREMENT = 1;

I THINK it will skip those already in use and take the next available number. Back up your database before trying this.