Membership plugin

I need to know how to say

if ( user is member(basic) ) {

do this

} else {

do that

}

What does the membership plugin uses to:

1) determine what plan a user falls under?

2) know if a user membership is expired?

  • Barry
    • DEV MAN’s Mascot

    There are new helper functions that will make this job a *lot* easier, but in the meantime you may want to add the following function to your system somewhere (custom plugin / themes function.php file):

    function current_user_on_level( $level_id ) {

    $user = wp_get_current_user();

    $member = new M_Membership( $user->ID );

    if(!empty($member)) {

    return $member->on_level( $level_id, true );

    } else {

    return false;

    }

    }

  • holidaymaine
    • Flash Drive

    Ok I will explain exactly what I need. I need blog admins to only be able to see the comment template on the main blog when they have paid to blog. when their pay to blog subscription runs out they should not be able to see the comment template any more.

    in normal wordpress functions I think it would be

    if (pay_to_blog(inactive) {

    do this

    } else {

    do that

    }

    but I have no idea how your plugin determine when a blog is inactive and how to call that function.

    Can someone please help me.

  • holidaymaine
    • Flash Drive

    Ok I will explain exactly what I need. I need blog admins to only be able to see the comment template on the main blog when they have paid to blog. when their pay to blog subscription runs out they should not be able to see the comment template any more.

    in normal wordpress functions I think it would be

    if (pay_to_blog(inactive) {

    do this

    } else {

    do that

    }

    but I have no idea how your plugin determine when a blog is inactive and how to call that function.

    Can someone please help me.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.