Skip to:

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#7597 closed enhancement (fixed)

No way to disable the email notification to the site admin of a new user registration

Reported by: antonioeatgoat's profile antonioeatgoat Owned by: djpaul's profile djpaul
Milestone: 3.0 Priority: low
Severity: normal Version:
Component: Registration Keywords: reporter-feedback


Once an user signs up, an email notification is sent to the admin from the BuddyPress function bp_core_activate_signup using the WordPress method wp_new_user_notification. There is no way to avoid this programmatically.

This might seems pointless at a first glance but it can be very helpful for membership or registration management plugins and it can be achieved in 1 minute. These plugins may have settings to improve the content of that email which cannot be used if BuddyPress is active, because it send a standard email. I experienced it with my own plugin that allow to manually approve registered users.

A simple filter like the example patch attached would does the job.

Attachments (2)

bp-members-functions.php (84.2 KB) - added by antonioeatgoat 6 years ago.
7597.01.patch (674 bytes) - added by antonioeatgoat 6 years ago.
Sorry for the previous file, this is the right one

Download all attachments as: .zip

Change History (10)

6 years ago

Sorry for the previous file, this is the right one

#1 @r-a-y
6 years ago

  • Keywords has-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Severity changed from major to normal
  • Status changed from new to closed

This is a WordPress issue.

If you want to disable the WP new user registration email, then add the following to a new file - wp-content/mu-plugins/disable-new-user-email.php:

function wp_new_user_notification() {}

#2 @webbaku
6 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Hello @r-a-y,

Sorry for the delay, I missed your reply. Thank you so much for your time but maybe I've explained badly, because this wasn't the point.

My point is not to disable the WP new user registration email totally, but avoid that BuddyPress use it in that circumstance, because I want to use it (the exact same function) in another place.

Does it make sense?

#3 @DJPaul
6 years ago

  • Keywords reporter-feedback added
  • Milestone set to Under Consideration

@webbaku *Which* function do you want to re-use in another place? bp_core_activate_signup()? And why?


#4 @antonioeatgoat
6 years ago

@DJPaul I am talking of wp_new_user_notification(), as showed in the patch file. For the reasons explained above.

Thank you.

P.S.: Webbaku is my not-personal account, I didn't notice I was using it, sorry for the confusion.

Last edited 6 years ago by antonioeatgoat (previous) (diff)

#5 @DJPaul
6 years ago

  • Milestone changed from Under Consideration to 3.0

#6 @djpaul
6 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from reopened to closed

In 11759:

Members: add filter to control notifying the site admin of a new user registration.

Fixes #7597

Props antonioeatgoat for the initial patch.

#7 @zodiac1978
5 years ago

WordPress core has added a $notify parameter in 4.6

I am wondering if this simple on/off filter is the best choice here. If you want to disable admin notifications you stumble upon this solution but if BuddyPress is active, this is not sufficient. You also need to change the filter from this patch to false. This is not very intuitive.

Note: See TracTickets for help on using tickets.