With Drupal: Access to this membership area is not allowed.

Discussion in 'Setting-up protection' started by robmid, Jan 19, 2010.

  1. robmid

    robmid aMember Pro Customer

    Joined:
    Nov 7, 2007
    Messages:
    10
    I am using Drupal but have decided not to integrate members with the Drupal module yet. I want a simple protection method to work first.

    I have specified the folder in "Protected Folders" and placed the following code in my page.tpl.php file:

    $_product_id = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24);
    require_once '/usr/local/web/www/amember/plugins/protect/php_include/check.inc.php';

    I am required to log in, but when I do so, I get this error:

    "Access to this membership area is not allowed. Please go to "Membership information page" to renew or add subscription"

    What else needs doing?

    -Bram Moreinis (for Robert Middleton)
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Add this before protection code
    global $_product_id;
    This should help.
  3. runchman

    runchman aMember Pro Customer

    Joined:
    Oct 8, 2009
    Messages:
    16
    I know you didn't ask, but I also use drupal, and to me the simplest method is to just have 2 user types, anonymous and authenticated.

    Someone has signed up via amember, logs in via amember, they are an authenticated member. Anyone else coming to your site is an anonymous member.

    Very simple then to control access to various areas of the site using Drupal's controls, no file mods required.

    my 2 cents worth,

    John
  4. theangelguy

    theangelguy Member

    Joined:
    Jul 15, 2009
    Messages:
    30
    What if you have more than one price level of subscription? How do you handle that?

Share This Page