How do you protect content based on status?

Discussion in 'Customization & add-ons' started by florida561, May 18, 2010.

  1. florida561

    florida561 Guest

    I'm trying to figure out how to protect parts of my webpages
    for only my active subscribers.

    For example, in my directory users that have a "pending" record can
    gain access to my directory, and use the web form, so how do I
    protect "inactive" users for using this form?

    I'm currently using this for my smarty pages:
    {if $smarty.session._amember_user.status ==1}
    {include file="header.html"}
    {else}
    {include file="header-no.html"}
    {/if}

    But I need the php code to add to my custom pages. Anyone
    know how to do this so only ACTIVE users can see the forms?

    Thanks
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Is this a php page or an amember page?
    If php, you can use php_include protection- see amember admin / protect folder


    David

Share This Page