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 agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.