Anyone? Please? It’s very important because of large number of site members…
Hi @nd1
Which email notification do you want to disable? Can you provide the text so I know which one?
I mean “User Profile->Settings->Email” menu. There you can see lot of email notification settings which are enabled by efault.
I’m not quite sure what you want to do. Can you explain a little more?
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.
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
Thanks, can you please clarify in which file I should put this function?
Thanks again, I added it to theme functions.php and it seems working as I expect.
@nd1 you were right, functions.php is the file it should go into.
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