Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disabling certain email notifications by default for new members

  • Avatar of jimmiejo
    jimmiejo
    Participant

    @jimmiejo

    If I’m not mistaken, all of the email notifications for members are enabled (set to Yes) by default in the notifications settings. Is there any way to customize these settings through a function to disable a few of them for all future members that register?

    I personally prefer the on-site notifications for everything but private messages, and think members of the communities I’m developing would as well.

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Avatar of vonWolfehaus
    vonWolfehaus
    Member

    @vonwolfehaus

    I totally agree with this. I couldn’t find the place where to reset default notification settings, so I’m bumping this in the hopes that someone would know this.

    Avatar of SteveGron
    SteveGron
    Member

    @stevegron

    I believe the settings are in the my account settings under notifications

    Avatar of Gayatriom
    Gayatriom
    Member

    @gayatriom

    Yes.
    but how can we set them for ALL new members?

    Avatar of rmazereeuw
    rmazereeuw
    Member

    @rmazereeuw

    I’d love this as well. Just a way to make them all off by default for all users, and let them choose to turn them on if they want.

    bump!

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    The best way to do this, at the moment, is to hook a function to one of the signup functions (perhaps the do_action hook ‘bp_core_activated_user’, found in bp-core/bp-core-signup.php), and to save a set of default settings when a user registers.

    Avatar of fancyfiber
    fancyfiber
    Member

    @fancyfiber

    First thanks to Boone Gorges for the direction on how to get started with this. And for those looking for a complete answer. Add this code (or similar) to your Theme functions.php file (my apologies if there is a better way to paste code…first time posting here):

    function set_default_notifications($user_id, $key, $user) {
    $valueyes = ‘yes’;
    $valueno = ‘no’;

    $new_messages = bp_get_user_meta_key(‘notification_messages_new_message’ );
    bp_update_user_meta( $user_id, $new_messages, $valueyes );

    $new_notices = bp_get_user_meta_key(‘notification_messages_new_notice’ );
    bp_update_user_meta( $user_id, $new_notices, $valueno );

    $group_invite = bp_get_user_meta_key(‘notification_groups_invite’ );
    bp_update_user_meta( $user_id, $group_invite, $valueyes );

    $group_update = bp_get_user_meta_key(‘notification_groups_group_updated’ );
    bp_update_user_meta( $user_id, $group_update, $valueno );

    $group_promo = bp_get_user_meta_key(‘notification_groups_admin_promotion’ );
    bp_update_user_meta( $user_id, $group_promo, $valueyes );

    $group_request = bp_get_user_meta_key(‘notification_groups_membership_request’ );
    bp_update_user_meta( $user_id, $group_request, $valueyes );

    $mention = bp_get_user_meta_key(‘notification_activity_new_mention’ );
    bp_update_user_meta( $user_id, $mention, $valueyes );

    $reply = bp_get_user_meta_key(‘notification_activity_new_reply’ );
    bp_update_user_meta( $user_id, $reply, $valueyes );

    $send_requests = bp_get_user_meta_key(‘notification_friends_friendship_request’ );
    bp_update_user_meta( $user_id, $send_requests, $valueyes );

    $accept_requests = bp_get_user_meta_key(‘notification_friends_friendship_accepted’ );
    bp_update_user_meta( $user_id, $accept_requests, $valueno );
    do_action( ‘bp_core_notification_settings_after_save’ );

    }
    add_action(‘bp_core_activated_user’, ‘set_default_notifications’, 10, 3);

    Avatar of neo-tronic
    neo-tronic
    Participant

    @neo-tronic

    is there another way to disable the email notifications? this doesn’t work for me… :(

    can anyone help please?

    Avatar of Anton
    Anton
    Participant

    @nat0n

    Any new light on this one? Handling default notifications would be awesome.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.