How to (manually) use aMember variables ?

Discussion in 'Customization & add-ons' started by jfoulquier, Oct 5, 2009.

  1. jfoulquier

    jfoulquier New Member

    Joined:
    Jul 22, 2009
    Messages:
    22
    Hello,

    I'm using aMember on WordPress. I'd like to manually (in the PHP code of my pages directly) play with aMember variables.

    For example, I'd like to be able to put in my pages :

    <?php
    if(is_user_ubscribed_to_product($productnumber))
    /* the rest of my PHP code here, only for user who subscribeds */
    ?>​
    Is that possible ?
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
  3. jfoulquier

    jfoulquier New Member

    Joined:
    Jul 22, 2009
    Messages:
    22
    Thank you David (David from MembershipAcademy ?). I already looked at the manual.
    But I didn't find any information which may tells me how to detect if my user is a subscriber of product #2.

    It should be something like
    if(in_array($_SESSION["_amember_product_ids"], 2)) {
    /* The damn code */
    }

    The code on the webpage you linked is only to display the user's contact informations...
  4. jfoulquier

    jfoulquier New Member

    Joined:
    Jul 22, 2009
    Messages:
    22
    Found on membershipacademy, thanks !
  5. aramtch

    aramtch New Member

    Joined:
    Oct 13, 2009
    Messages:
    11
    Can you post your solution - we're having the same issue here. Thx.

Share This Page