Protection Conditions

Discussion in 'Troubleshooting' started by baduist, May 20, 2012.

  1. baduist

    baduist Member

    Joined:
    Apr 13, 2012
    Messages:
    33
    Until I figure out how to move my 100 users from s2member to amember, I'd like to protect cetain urls with both systems, i.e. have URL1 be accessible to members of both membership tools.

    With s2member I can add conditions to the protection codes, so I can detect members. Is it possible with amember in a way that I can do something like this?

    if(amember_user) {
    // access granted
    } elseif (s2member_user) {
    // access granted
    } else {
    echo 'access denied'; die();
    }
  2. baduist

    baduist Member

    Joined:
    Apr 13, 2012
    Messages:
    33
    Update: seems like the problem is that when protecting urls through the amember dashboard it creates an (httaccess?) redirect.

    Is it possible to override the redirect and use a php condition for protection (i.e. some sort of "if logged in")?
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,435
    Whats the content you are protecting? mp3s or php files?

    David
  4. baduist

    baduist Member

    Joined:
    Apr 13, 2012
    Messages:
    33
    php files
  5. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,435

Share This Page