Opened 22 months ago
Last modified 2 months ago
#3443 new enhancement
A proper way to disable activation e-mails for new sign up?
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Core | Version: | 1.5 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
This will help reducing all this confusion about sign up problems, so can we ask to add that option to 1.5 or even as a filter or simple code to change to " false " ? I hope this can be considered as sign up for a community is the core :)
Change History (11)
comment:1
boonebgorges — 22 months ago
- Milestone changed from Awaiting Review to Future Release
Thanks for the answer :) if I can say something, it would be that every community have its needs, and some small size websites can be always in attention to who sign up one by one, so that's why for some people you may don't even need a spam protection at times, so it's not for encouraging people to turn e-mail activation off, it's for giving them a second option :)
Thanks again, all your hard work appreciated :)
Isn't this already possible with something like:
WP Standard
add_filter( 'bp_core_signup_send_activation_key', '__return_false' );
and
WP Multisite
add_filter( 'wpmu_signup_user_notification', '__return_false' );
Both lines disable the sending of the activation email for their respective WP flavors.
@cnorris23 is that filter works with budyypress normally? and does it go in wp.config or what file, I may test that.
comment:5
boonebgorges — 22 months ago
cnorris23 - That will keep the email from being sent, but it won't bypass the activation process, which is (I assume) what cupid4 wants.
@boonebgorges yep, that what I'm trying hard to do, disabling the activation process at all in multisite-buddypress install, I wish things was that easy as one line though :)
Oh, well in that case, for a WP Multisite install, try this:
// Change the text on the signup page
add_filter( 'bp_registration_needs_activation', '__return_false' );
function my_disable_activation( $user, $user_email, $key, $meta = '' ) {
// Activate the user
bp_core_activate_signup( $key );
// Return false so no email sent
return false;
}
add_filter( 'wpmu_signup_user_notification', 'my_disable_activation', 10, 4 );
This should work if placed in a plugin, you themes functions.php file, or your bp-custom.php file.
@cnorris thanks so much for the solution :) tested it, working great for user sign up without creating blog, but have strange effect if the user created a blog, he is air :) like he never registered, and the message he get in e-mail is:
" Thanks for registering! To complete the activation of your account and blog, please click the following link: After you activate, you can visit your blog here: "
that was the message, with no links at all, weather activation link or blog link, and couldn't sign in with that user at all, as I said, air :)
I think multisite is always the problem cause when I tested a plugin earlier it gave me some close error and the user never created when choosing to take a blog in sign up.
Don't know why multisite conflict with any filter trying to disable activation mail, perhaps this can be made easier by reporting to WordPress trac?
You'll need to add two extra lines to prevent the other email from being sent.
remove_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 ); add_filter( 'wpmu_signup_blog_notification', '__return_false' );
I can't seem to track down why the email would be missing the relevant links, or why the user/blog isn't being fully activated. I guess I'll have to suck it up and actually test on my local multisite install ;) if you can't get it working.
comment:10
_DorsVenabili — 2 months ago
- Cc rocvaltor@… added
The last functions has a bug, it activate corretly the user after registration, but it's still sending the activation key email (at least using WP multisite), so it can be very confusing for the users, because they're already active.
Any ideas to stop sending the activation key email?
Thanks
comment:11
_DorsVenabili — 2 months ago
- Cc rocvaltor@… removed
Ok, I've got the way to disable the activation email for new sign up users and stop sending the activation email for WP multisite + BP installations:
// Change the text on the signup page
add_filter( ‘bp_registration_needs_activation’, '__return_false' );
function my_disable_activation( $user, $user_email, $key, $meta = ” ) {
// Activate the user
bp_core_activate_signup( $key );
// Return false so no email sent
return false;
}
add_filter( ‘wpmu_signup_user_notification’, ‘my_disable_activation’, 10, 4 );
//Disable new blog notification email for multisite
remove_filter( ‘wpmu_signup_blog_notification’, ‘bp_core_activation_signup_blog_notification’, 1, 7 );
add_filter( ‘wpmu_signup_blog_notification’, '__return_false' );
// disable sending activation emails for multisite
remove_filter( ‘wpmu_signup_user_notification’, ‘bp_core_activation_signup_user_notification’, 1, 4 );
add_filter( ‘wpmu_signup_user_notification’, '__return_false', 1, 4 );
Hope someone helps.
Cheers! :D

Email notification is a WP core feature when multisite is enabled.
In any case, email activation is the only thing preventing massive amounts of spam signups on any BP or WP Network installation. It's not the kind of thing we want to encourage people to turn off.
That said, I would be willing to consider a patch that introduces a filter of some sort, so that other kinds of registration spam blocking plugins (captchas, for example) could have the option of disabling activation emails.
It's way too late for anything this version, but a patch for the next feature release would be considered.