How can i get a users membeship status with just PHP?

Discussion in 'Customization & add-ons' started by alexblyz91, Mar 31, 2020.

  1. alexblyz91

    alexblyz91 New Member

    Joined:
    Aug 9, 2019
    Messages:
    24
    Hi,
    I would like to use PHP to check if a user is a current paying member or get the ID of their membership package so i can verify if they are currently paying, is it possible to do this with just PHP?

    I want to supply a username via PHP and then get the output returned as a variable if possible

    How can i acheive this?
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
  3. alexblyz91

    alexblyz91 New Member

    Joined:
    Aug 9, 2019
    Messages:
    24
    Hi Caesar,
    I require to be able to check on my server without the user being logged in and without using the application, i am building custom script to check if user has subscription.
  4. alexblyz91

    alexblyz91 New Member

    Joined:
    Aug 9, 2019
    Messages:
    24
    I need something like this:
    <?php
    username="testuser'
    include("../amamber/library/Am/Lite.php");
    Am_Lite::getInstance()->haveSubscriptions($testuser);
    ?>

    Then yes or no is returned
  5. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
  6. alexblyz91

    alexblyz91 New Member

    Joined:
    Aug 9, 2019
    Messages:
    24
    did it with REST API
    Thanks
    caesar likes this.

Share This Page