Skip to:
Content

Opened 16 months ago

Closed 14 months ago

Last modified 4 months ago

#7597 closed enhancement (fixed)

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

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

Description

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 16 months ago.
7597.01.patch (674 bytes) - added by antonioeatgoat 16 months ago.
Sorry for the previous file, this is the right one

Download all attachments as: .zip

Change History (9)

@antonioeatgoat
16 months ago

Sorry for the previous file, this is the right one

#1 @r-a-y
16 months 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:

<?php
function wp_new_user_notification() {}

#2 @webbaku
16 months 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
16 months 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?

Thanks!

#4 @antonioeatgoat
16 months 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 16 months ago by antonioeatgoat (previous) (diff)

#5 @DJPaul
14 months ago

  • Milestone changed from Under Consideration to 3.0

#6 @djpaul
14 months 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
4 months ago

WordPress core has added a $notify parameter in 4.6
https://core.trac.wordpress.org/ticket/36009

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.