Question

I am looking after a old site from a client and a lot of users dont have username.

I had setup in woocommerce "When creating an account, automatically generate a username from the customer's email address", but for some reason it is not creating username for the new user, so I unticked that and left the field mandatory.

Now, If an user with blank username request a new password, wordpress doesnt send an email. Only if I go manually to the phpmyadmin and included it. However there are more than 500 users without username. Is there a way to automatically get the user email for example and include in the username field?

Or make wordpress send email even with no username?

Thank you,

Was it helpful?

Solution

WordPress functions doesn't allow to modify user login then you need to change directly the database.

make a backup of you database and try this to fill login with something like user4589

UPDATE `wp_users` SET `user_login` = CONCAT("user", ID) WHERE `user_login` = ""
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top