Support » Fixing WordPress » Simple email register form

  • Does anyone know if there is a way to add a simple register form with only the email address feild and this then creates a new user? (In other words no username or password in the register form.)

Viewing 1 replies (of 1 total)
  • I tried this just now for an event related site. It’s 100% hacky, but on wp_login.php, about line 298, I added a $user_login = $user_email:

    function register_new_user( $user_login, $user_email ) {
    	$errors = new WP_Error();
    	$user_login = $user_email;
    	$sanitized_user_login = sanitize_user( $user_login );

    This makes the login field data irrelevant, and replaces with the email address. Then, it sanitazes and continue with the registration process.
    Then, you should remove or hide the user_login text field
    I’m not sure if it’s the best way to do it, but it works for now.

    It’s important to note that I made this form not available for the general public, it just for event organizers.

Viewing 1 replies (of 1 total)
  • The topic ‘Simple email register form’ is closed to new replies.