I want to my WordPress users to be automatically assigned a random (e.g. 8 digit) user ID when registering, instead of having to choose a username. So, in effect, they have a membership number instead of a username, although it is the same field being used.

So, how do I hook into the new user creation function and generate this ID?

Also, I need to replace around 1200 existing users (site is not being used at present, they will receive an email with their details later) with ID numbers.

What's the best approach to each of these items?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.