0

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.

1 Answer 1

2

The 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.

1
  • Ok. Didnt think of that, thanks, thats why I asked. Seem Id have to use a custom field instead.
    – Jumbled
    Commented Oct 9, 2019 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.