I want to use an email address instead of username to register and login my members. I've got the login part working using some of the code in this answer. Works fine but as expected wordpress still wants a username on the register page (custom, not the default).
This line of code registers the user:
$user_signup = wp_insert_user( $user_data );, and when registering I get the following error:
Cannot create a user with an empty login name.
I'm guessing this can be solved by removing the appropriate filter, but I'm new to wordpress. What's the code to remove the username requirement?