Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] API response

Simple Membership Plugin › Forums › Simple Membership Plugin › API response

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 4 months ago by The Assurer.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 22, 2018 at 10:01 am #14216
    kepler
    Participant

    Good morning

    If I query an user via API, what are the possible responses I can get in the field “account_state” besides active? Is there an expired value for instance? I would like to query the API and know this information: if the user is active, non-existant or the subscription expired.

    Also, if I protect a page that has a download link for a file, will that download be protected? What is the best way to do it?

    Kind regards

    Kepler

    April 23, 2018 at 1:04 am #14227
    The Assurer
    Moderator

    If I query an user via API, what are the possible responses I can get in the field “account_state” besides active? Is there an expired value for instance? I would like to query the API and know this information: if the user is active, non-existant or the subscription expired.

    Because the value reflects the member’s account status; the only possible values are those listed in the Members –> Add Member –> Account Status drop-down menu.

    Hint: There are 4.

    Also, if I protect a page that has a download link for a file, will that download be protected?

    A link on a protected page is only protected from being clicked by members who are not of the same level as the other protected content on that page. If you require additional protection, such as link encryption, have a look at the Simple Download Monitor plugin.

    April 23, 2018 at 1:41 am #14233
    kepler
    Participant

    Hi,

    So I assume that I’ll get one of these four results IF the account exists:

    – Active
    – Inactive
    – Pending
    – Expired

    ? If doesn’t exists, I’ll get an error.

    Is this right?

    Kind regards,

    Kepler

    April 23, 2018 at 3:26 am #14234
    The Assurer
    Moderator

    If the member does not exist, the return value is a NULL pointer. What you do with that, is up to you, but getting a NULL pointer is not necessarily an error.

    If you are not a real PHP programmer; you might want to consider hiring one.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy