Title: Register without email!
Last modified: August 21, 2016

---

# Register without email!

 *  [incubeftw](https://wordpress.org/support/users/incubeftw/)
 * (@incubeftw)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/register-without-email/)
 * Hello,
 * I just figured out how to make register without sending the email.
 * Here is how to do it:
 * #1 wp-login.php
 * Find
 *     ```
       if ( $http_post ) {
       		$user_login = $_POST['user_login'];
       		$user_email = $_POST['user_email'];
       ```
   
 * After that add:
 *     ```
       $password = $_POST['password'];
       ```
   
 * Replace
    `$errors = register_new_user($user_login, $user_email);` With `$errors
   = register_new_user($user_login, $user_email, $password);`
 * Find
 *     ```
       <p>
       		<label for="user_email"><?php _e('E-mail') ?><br />
       		<input type="text" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(wp_unslash($user_email)); ?>" size="25" /></label>
       	</p>
       ```
   
 * After that add
 *     ```
       <p>
       		<label for="password">Password<br />
       		<input type="text" name="password" id="password" class="input" value="<?php echo esc_attr(wp_unslash($password)); ?>" size="25" /></label>
       	</p>
       ```
   
 * And then remove the notice about sending random pwd.
 * #2 wp-includes/user.php
 * Find register_new_user function, make it like this:
    `function register_new_user(
   $user_login, $user_email, $password ) {`
 * find the checks and add:
 *     ```
       // Check the password
       	if ( !$password ) {
       		$errors->add( 'empty_password', __( '<strong>ERROR</strong>: You haven\'t entered a password.' ) );
       	}elseif ( strlen($password) < 6 || strlen($password) > 25){
       		$errors->add( 'empty_password', __( '<strong>ERROR</strong>: Password is invalid (password is too short or too long.)' ) );
       	}
       ```
   
 * Find `$user_pass = wp_generate_password( 12, false );`
    Replace with `$user_pass
   = apply_filters('random_password',$password);`
 * GJ! Now there is no random passsword!
 * Regards,
    – InCube.

Viewing 1 replies (of 1 total)

 *  [maineyak](https://wordpress.org/support/users/maineyak/)
 * (@maineyak)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/register-without-email/#post-4495654)
 * I was hoping this would work, but this is what I get:
    ERROR: You haven’t entered
   a password. I edited as you instructed.

Viewing 1 replies (of 1 total)

The topic ‘Register without email!’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [maineyak](https://wordpress.org/support/users/maineyak/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/register-without-email/#post-4495654)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
