#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)
Change History (10)
#1
@
7 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
:
<?php function wp_new_user_notification() {}
#2
@
7 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
@
7 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?
Thanks!
#4
@
7 years ago
@DJPaul I am talking of wp_new_user_notification()
, as showed in the patch file. For the reasons explained above.
Thank you.
#6
@
7 years ago
- Owner set to djpaul
- Resolution set to fixed
- Status changed from reopened to closed
In 11759:
#7
@
6 years 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.
Sorry for the previous file, this is the right one