Remove toolbar + more

good morning,
is the first time I use the plugin and I’m considering whether to buy it but I have doubts.
I would like a user to register as a subscriber Level 0 receiving a welcome email with activation link. It’s possible?
After logging in I would like to remove the toolbar where to change the profile.
And I would like to understand how to get a logout button or a menu reserved for users who have been manually approved. Thank you

Hi,
Give level zero is a free registration but if it is the desired operation, it is quite possible to make this free registration with a welcome email containing his login and a link to generate his password.
Regarding the removal of the tool bar and the ‘connection / disconnection’ button dedicated to your registered users, enter these lines in the ‘functions.php’ file of your child theme:

if (!current_user_can('manage_options')){
       show_admin_bar(false);}
function add_login_logout_link($items, $args){
       ob_start();
       wp_loginout('your website connection address');
       $loginoutlink=ob_get_contents();
       ob_end_clean();
       $items .= '<li class="menu-item">'.$loginoutlink.'</li>';
       return $items;}
add_filter('wp_nav_menu_items','add_login_logout_link',10,2);

Thanks Brice, everything is ok.
I would like to understand, when I purchase the PRO version of s2member there will be the possibility to receive for users who register the link to activate the account?
Is there a possibility for the administrator to receive an email notification of each user who registers?
Thank you

Hi,
Yes, S2member includes several solutions allowing you to be alerted to each registration and / or payment of a member!
Check the API / Notifications section, it will surely reassure you.
In addition, the basic operation informs you via email.
Thanks.

Thanks for your help.
Can you please write an example of api for sending an email every time a new user registers at the site?
I do not know where to start from.
I asked for help from a friend of mine who changed your script a bit. I publish it so it can help some users. Your help is important to me. thank you

if (!current_user_can('manage_options')) { show_admin_bar(false); }
function add_login_logout_link($items, $args){
    $items .= '<li class="menu-item">';
    if ( is_user_logged_in() ) {
        $items .= '<a href="' . wp_logout_url( 'https://www.xxxx.xxxx/after-logout' ) . '">Logout</a>';
    } else {
        $items .= '<a href="' . wp_login_url( 'https://www.xxxxx.xxxxx/after-login' ) . '">Login</a>';    
    }
    $items .= '</li>';
    return $items;
}
add_filter('wp_nav_menu_items','add_login_logout_link',10,2);

Hi,
Your friend’s fixes work but were not necessary, as the basic function takes care of changing state between connected / disconnected automatically, but it doesn’t matter!
The s2Member-> General Options-> Email Configuration section is the easiest way to set up and customize e-mails sent to your members and to the site administrator (you) without any required programming.
Thanks.

I would advise against buying the premium version of S2 Pro. Developer support & updates of S2member has long stopped. Since starting a paid subscription service with S2 a couple of years ago, my subscriber base has grown to a level where I am at a huge risk of losing existing & prospective customers, should S2M suddenly stop working.

I would highly suggest doing a search to confirm what I have said & consider another membership plugin that is supported. I am searching for a replacement now & so far, MemberPress is at the top of my list. They charge a recurring annual fee but I believe that is what will keep them motivated to both update & improve that plugin whereas S2M has little to no financial incentive to do so with their one-time fee. I wish they would prove me (and many others) wrong but I’ve waited too long & can’t risk relying on S2M any longer.

I will continue the support and development of this plugin, may be with another name. So it is not “dead”. May be either “rescued”, or “replaced”. I know how much pain is to change a membership system, and want to save your efforts.