Disable User registration form email error
-
I’m having trouble writing a function to disable/remove the following error from the user registration process:
ERROR: Please type your e-mail address.I have customized the registration form so that the Username field is renamed to Email and the input is posted to both the username and email fields. This works fine except that when attempting to register as a new user, the first time the form returns the following error:
“ERROR: Please type your e-mail address.”
Click Register a second time and it goes through, I’m guessing because the information was posted to user->email the first time.
I would really appreciate if someone could show me how to write a function that removes the error.
The form was customized with a modified version of the Thememylogin form, and to get the input for “username” to save as email I added the following in my themes functions.php file:
`add_action(‘user_register’, ‘myplugin_user_register’);
function myplugin_user_register ($user_id) {
if ( isset($_POST[‘username’] ) )
update_user_meta($user_id, ’email’, $_POST[‘username’]);
}`
The topic ‘Disable User registration form email error’ is closed to new replies.