Expiring a product by visiting an URL

Discussion in 'Customization & add-ons' started by rsigcourses, Aug 19, 2011.

  1. rsigcourses

    rsigcourses Member

    Joined:
    Mar 8, 2011
    Messages:
    46
    Background: We have online exams setup, and we want to expire users accounts immediately upon completion of the exam. After they complete the exam there are directed to a URL.

    Is there anyway to automatically expire their accounts? I checked the database and the information seems to be serialized in one field in the _members table (data)

    I looked at cron.php but that wasn't much help, any other ideas on how to change their expiration dates?
  2. rsigcourses

    rsigcourses Member

    Joined:
    Mar 8, 2011
    Messages:
    46
    Okay of course after i post this, I find some information. It seems payment expirations are set in _payments table.

    My question is how to get the logged in members payment ID, or if anyone know what file to look in for that it'd be great.
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can get this info from session.
    $_SESSION[_amember_subscriptions] - is array of all active subscriptions that user have.
  4. rsigcourses

    rsigcourses Member

    Joined:
    Mar 8, 2011
    Messages:
    46
    Thanks for the help that should get me started :D

Share This Page