latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Marco Tironi

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Redirect only certain userroles away from adm

By:  Marco Tironi in: Community Forum

voices: 2
replies: 4

3 years, 7 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Redirect only certain userroles away from adm

By:  Marco Tironi in: Community Forum

voices: 2
replies: 4

3 years, 7 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Monday May 27th, 2013 at 12:06 pm #50713

Hi Christian. Great!! This solve my problem. Excellence support for excellent plugin.

I managed to do what I needed, following your suggestion and modyfing the code as follows (if could help somebody in future):

<?php
add_filter('ws_plugin__s2member_admin_lockout', 'my_redirect_filter', 10, 2);
function my_redirect_filter($redirect = TRUE, $vars = array())
    {
        $user = wp_get_current_user();
        if (current_user_can('access_s2member_level3'))
            $redirect = FALSE;
        else if (defined('IS_PROFILE_PAGE') && IS_PROFILE_PAGE)
            $redirect = FALSE; // The user's own profile page in the Dashboard.
        return $redirect; // MUST return a boolean value here.
    }
?>

Cheers!
Marco

Viewing 1 replies (of 1 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.