Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change default notification settings


  • mistercyril
    Participant

    @mistercyril

    Hello,
    I was wondering if there was a clever way to switch default email notification settings from YES to NO for all my users.
    I would even be happy with guidance for doing it in SQL, but it should stay like this for new users as well…
    Thanks,
    C.

Viewing 1 replies (of 1 total)

  • mistercyril
    Participant

    @mistercyril

    I found a post written by Boone ( http://bpdevel.wordpress.com/author/boonebgorges/ ) where he says something about replacing all references to “$current_user” with “$bp->displayed_user” in order to allow super admins to have access to user settings.

    I am using BuddyPress v.1.2.8 and found this code in bp-core-settings.php…

    /***** NOTIFICATION SETTINGS ******/

    function bp_core_screen_notification_settings() {
    global $current_user, $bp_settings_updated;

    $bp_settings_updated = false;

    if ( $_POST ) {
    check_admin_referer('bp_settings_notifications');

    if ( $_POST ) {
    foreach ( (array)$_POST as $key => $value ) {
    update_user_meta( (int)$current_user->id, $key, $value );
    }
    }

    $bp_settings_updated = true;
    }

    add_action( 'bp_template_title', 'bp_core_screen_notification_settings_title' );
    add_action( 'bp_template_content', 'bp_core_screen_notification_settings_content' );

    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }

    function bp_core_screen_notification_settings_title() {
    _e( 'Notification Settings', 'buddypress' );
    }

    function bp_core_screen_notification_settings_content() {
    global $bp, $current_user, $bp_settings_updated; ?>

    <form action="loggedin_user->domain . BP_SETTINGS_SLUG . '/notifications' ?>" method="post" id="settings-form">

    <input type="submit" name="submit" value="" id="submit" class="auto" />

    <?php
    }

    Can someone help me out with implementing this?
    Thanks,
    C.

Viewing 1 replies (of 1 total)
  • The topic ‘Change default notification settings’ is closed to new replies.
Skip to toolbar