Viewing 5 replies - 1 through 5 (of 5 total)
  • I am experiencing the same issue
    Wordpress version 4.0
    BP version 2.1.1

    BP Disable Activation Reloaded version 1.2.1

    When a new user registers two ‘New user registration’ emails are sent to my admin email address.

    I suspect this is because in your code you are calling wp_new_user_notification() and
    bp_core_activate_signup() . Since bp_core_activate_signup() is a core bp function that aldeady calls wp_new_user_notification() two emails are sent. Removing wp_new_user_notification() on line 199 of bp-disable-activation-loader.php will probably stop this.

    Mr3lade

    (@mr3lade)

    Removing the following lines from bp-disable-activation-loader.php will fix all issues. Furthermore, you probably didn’t notice that a new user registration also appeares twice in the Activitystream.

    //Add note on Activity Streamif ( function_exists( 'bp_activity_add' ) ) {$userlink = bp_core_get_userlink( $user_id );bp_activity_add( array('user_id' => $user_id,'action' => apply_filters( 'bp_core_activity_registered_member', sprintf( __( '%s became a registered member', 'buddypress' ), $userlink ), $user_id ),'component' => 'profile','type' => 'new_member') );}//Send email to adminwp_new_user_notification( $user_id );

    I tried removing the lines but it doesn’t seem to be working. I still get 2 emails. Can anyone help?

    The code from Mr3lade is spot on. (Thanks Mr3lade by the way – I hadn’t spotted it was also causing duplicate entried in the activity stream)

    Posted code can get a bit messed up when posting to WordPress support so make sure you haven’t forgotten to comment out that last line. The specific line that causes the duplicate email to be sent is
    wp_new_user_notification( $user_id )

    Thread Starter hugblue71

    (@hugblue71)

    Thanks a lot for the solution. Checking it out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Double mail’ is closed to new replies.