Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: I would like to disable Email activation


Andy Peatling
Keymaster

@apeatling

If you put the following code in a plugin then this will disable activation, although the users will still receive an activation email. In any case, they will be able to log straight in and the new account screen will tell them that.

If someone wants to add this to a plugin and release it please do, but I haven’t tested it, so do that first. In the next version I will add an option to disable activation emails too.

function disable_validation( $user_id ) {
global $wpdb;

$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_status = 0 WHERE ID = %d", $user_id ) );
}
add_action( 'bp_core_signup_user', 'disable_validation' );

function fix_signup_form_validation_text() {
return false;
}
add_filter( 'bp_registration_needs_activation', 'fix_signup_form_validation_text' );

Skip to toolbar