How to remove wordpress email validation

How to remove wordpress email validation

 hi all please follow me at twitter.

Well to the point.. how to remove the kreepy validation of wordpress.. wordpress generates an autorandom password and sends a email to the user.. if you want to remove this , do the following--

btw , Im using a combination with cimy wordpress custom fields plugin ..

go to wp-signup.php for multiste and edit the function  validate_user_signup
my code in bold

function validate_user_signup() {
        $result = validate_user_form();
        if ( $errors->get_error_code() ) {
                signup_user($user_name, $user_email, $errors);
                return false;
        if ( 'blog' == $_POST['signup_for'] ) {
                signup_blog($user_name, $user_email);
                return false;

global $wpdb;

// Disable confirmation email
add_filter( 'wpmu_signup_user_notification', '__return_false' );
// add the user to multisite( $wpdb->blogid ) and the current blog (add_signup_meta)
wpmu_signup_user( $user_name, $user_email, array(  'add_signup_meta', array() ,  'add_to_blog' =>  $wpdb->blogid  , 'new_role' => 'subscriber'  )  );
// Get the activacion key to use later
$key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $user_name, $user_email ) );
//Use the activation key and active them
$result = wpmu_activate_signup( $key );
//Get the result
//if there is any error stop the sccript
if ( is_wp_error($result) ) {
                  echo ''.$result->get_error_message().'
} else
// else create an objet user from the new user generated , this in case you want to do more stuff
 $user = new WP_User( (int) $user_id);
// show success message
 confirm_user_signup($user_name, $user_email);
 return true;


 Well that its all.. follow me at  #jamesjara if you want more source code and hacking sources...

0 pensamientos:

Post a Comment