- This topic has 3 replies, 2 voices, and was last updated 8 years, 4 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › API response
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
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.
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
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.