Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to disable email notification to all newly registered users?

  • @nd1

    Participant

    Hello! Can someone help me with that thing? I want to make email notifications options disabled for all new users.

    Thanks. I’m using BP 2.0.3.

Viewing 10 replies - 1 through 10 (of 10 total)
  • @nd1

    Participant

    Anyone? Please? It’s very important because of large number of site members…

    @henrywright

    Moderator

    Hi @nd1

    Which email notification do you want to disable? Can you provide the text so I know which one?

    @nd1

    Participant

    I mean “User Profile->Settings->Email” menu. There you can see lot of email notification settings which are enabled by efault.

    @henrywright

    Moderator

    I’m not quite sure what you want to do. Can you explain a little more?

    @nd1

    Participant

    View post on imgur.com

    I want that all newly registered users have disabled email notifications by default. Now they should go to this menu and turn them off by own hands.

    @henrywright

    Moderator

    Try this function:

    function bp_set_notification_default( $user_id ) {
        $keys = array( 'notification_activity_new_mention', 'notification_activity_new_reply', 'notification_friends_friendship_accepted', 'notification_friends_friendship_request', 'notification_groups_admin_promotion', 'notification_groups_group_updated', 'notification_groups_invite', 'notification_groups_membership_request', 'notification_messages_new_message', 'notification_messages_new_notice' );
    
        foreach ( $keys as $key ) {
            update_user_meta( $user_id, $key, 'no' );
        }
    }
    add_action( 'bp_core_signup_user', 'bp_set_notification_default', 100, 1 );

    Ref: http://premium.wpmudev.org/forums/topic/how-can-i-disable-buddypress-notification-email

    @nd1

    Participant

    Thanks, can you please clarify in which file I should put this function?

    @nd1

    Participant

    Thanks again, I added it to theme functions.php and it seems working as I expect.

    @henrywright

    Moderator

    @nd1 you were right, functions.php is the file it should go into.

    @flickchicks

    Participant

    I’m still new to buddypress. I’m wondering if this thread might be close to what I need. I don’t want to get any new user notifications sent to me (my admin email address). The notification I get shows the new user’s email address. I want email addresses to be private and drop into some kind of database that I can later use to send newsletters to. Anyway to fix that?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to disable email notification to all newly registered users?’ is closed to new replies.
Skip to toolbar