Can I replace the default user ID generation on registration to a more advanced one? Similar to SHA-256 et al ?
I'm working on prototyping a service with possibility of massive amounts of signups and for different reasons I'd like to replace the default function.
Can I replace the default user ID generation on registration to a more advanced one? Similar to SHA-256 et al ?
I'm working on prototyping a service with possibility of massive amounts of signups and for different reasons I'd like to replace the default function.
Share Improve this question edited Oct 9, 2019 at 12:20 butlerblog 5,1213 gold badges28 silver badges44 bronze badges asked Oct 9, 2019 at 9:25 JumbledJumbled 11 Answer
Reset to default 2The WordPress wp_users table uses an ID that is an auto-increment integer for unique user ID.
There is no way to change that without making significant changes to the way WordPress works, and even if you do that, you will break most plugins that depend on the integer value for user ID.
I don't see any benefit from using hashed value for the ID. IDs are unique in a single installation of WordPress. ID in the form of number is the best solution for MySQL queries, database tables indexing, and other things. All websites today use numerical IDs for users for those reasons.