[buddypress-trac] [BuddyPress Trac] #8081: BuddyPress breaks disabling notification for new users

buddypress-trac noreply at wordpress.org
Wed Apr 17 13:01:47 UTC 2019


#8081: BuddyPress breaks disabling notification for new users
--------------------------+-----------------------------
 Reporter:  zodiac1978    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 I've written a blog post about the problem (in German) here:
 https://torstenlandsiedel.de/2018/09/13/benachrichtigungsmails-fuer-
 admins-abstellen/

 Please see these tickets for more details:
 https://core.trac.wordpress.org/ticket/36009#comment:14
 https://buddypress.trac.wordpress.org/ticket/7597#comment:7

 Summary:
 Sine WordPress 4.6 wp_send_new_user_notifications has a new parameter
 which sets up who should get the notification. Default is both (user and
 admin). You can remove this function via remove_action and re-add a new
 function which has the default changed to user instead to disable the
 admin notification.

 The problem is that BuddyPress didn't know this and makes its own thing in
 bp-members-functions.php:

 {{{#!php
 <?php
 if ( apply_filters( 'bp_core_send_user_registration_admin_notification',
 true ) ) {
     wp_new_user_notification( $user_id );
 }
 }}}


 It did not use the third parameter and adds a different way to disable the
 notification via filter.

 So you need an additional filter to disable it:

 {{{#!php
 <?php
 add_filter( 'bp_core_send_user_registration_admin_notification',
 '__return_false' );
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8081>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list