Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 7 years ago

#3443 closed enhancement (maybelater)

A proper way to disable activation e-mails for new sign up?

Reported by: cupid4's profile cupid4 Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Emails Keywords: needs-patch, trac-tidy-2018
Cc: math.viet@…

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 (16)

#1 @boonebgorges
13 years ago

  • Milestone changed from Awaiting Review to Future Release

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.

#2 @cupid4
13 years ago

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 :)

Last edited 13 years ago by cupid4 (previous) (diff)

#3 @cnorris23
13 years ago

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.

#4 @cupid4
13 years ago

@cnorris23 is that filter works with budyypress normally? and does it go in wp.config or what file, I may test that.

#5 @boonebgorges
13 years 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.

#6 @cupid4
13 years ago

@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 :)

#7 @cnorris23
13 years ago

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.

#8 @cupid4
13 years ago

@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?

#9 @cnorris23
13 years ago

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.

Last edited 13 years ago by cnorris23 (previous) (diff)

#10 @_DorsVenabili
12 years 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

#11 @_DorsVenabili
12 years 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

#12 @boonebgorges
11 years ago

  • Keywords needs-patch added

This will need repatching to take into account the new BP_Signup routine. If someone could package it in a way that will allow for workarounds in both Multisite and non-Multisite, I'd be glad to take a look.

#13 @imath
11 years ago

  • Cc math.viet@… added

#14 @slaFFik
8 years ago

  • Component changed from Core to Emails

#15 @DJPaul
7 years ago

  • Keywords trac-tidy-2018 added

We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.

Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.

If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.

For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/

#16 @DJPaul
7 years ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.