WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
[resolved] Help Suscriber2 Email-Massive (7 posts)

  1. nyxer
    Member
    Posted 1 year ago #

    Suscriber2 VersiĆ³n 8.4

    I don't like it, that everyone can send emails to everyone. Is there a way I can prevent this?

    edit the plugin?

    how and where

    Thanks!

    http://wordpress.org/extend/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @nyxer,

    You haven't been very specific so I'm guessing you are talking about access to the Subscribe2->Send Email page. Only Registered users with a user level of Author or above can access this page.

    If you don't like that and want to change it it's pretty easy with a little plugin (easier this way then editing the code so it is retained between updates)

    Visit the FAQ page and look for the question "I want to change the kinds of users who can access the Subscribe2 menus. Is that possible?"

  3. nyxer
    Member
    Posted 1 year ago #

    I say add the code ..

    function s2_admin_changes( $capability, $menu ) {
        // $capability is the core WordPress capability to allow admin page access
        // $menu is the title of the page:
        //  'user' for access to personal subscription settings
        //  'manage' to allow access to the user management screen
        //  'settings' to allow access to the plugin settings
        //  'send' for access to the Send Email page
    
        // identify the menu you are changing capability for first
        // then return a new capability
        if ( $menu == 'send' ) {
            return 'read';
        }
    
        return $capability;
    }
    
    add_filter('s2_capability', 's2_admin_changes', 10, 2);

    in functions.php

    add it, but go in with an account of a subscriber and I can send messages like, I want only administrators to send emails

  4. nyxer
    Member
    Posted 1 year ago #

    add the code,
    but I can still send messages to a subscriber account

  5. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @nyxer,
    You need to read the code a little more:

    // identify the menu you are changing capability for first
    // then return a new capability

    So, you need to amend the capability, try using 'manage_options' instead of 'read'.

  6. nyxer
    Member
    Posted 1 year ago #

    sorry no English, use google translator,.

    I should do..

    change the code, by which...

  7. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @nyxer,

    Your English is good for a non-English speaker :)

    Change:
    return 'read';

    To:
    return 'manage_options';

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic