Page 1 of 1

php conditional for is user currently subscribed?

PostPosted: August 3rd, 2011, 4:28 pm
by craigjb12
I can't seem to find a php conditional for is user currently subscribed

Re: php conditional for is user currently subscribed?

PostPosted: August 3rd, 2011, 4:59 pm
by craigjb12
I think this works...

Code: Select all

if ($subscr_id = get_user_option ("s2member_subscr_id", $user_id)) {
  echo '<p>As a subscribed member you will be charged according to your billing preferences one year after your last payment. </p>';   
} else {
  echo '<p>You are not currently subscribed.</p>';
}

Re: php conditional for is user currently subscribed?

PostPosted: August 3rd, 2011, 11:26 pm
by Cristián Lávaque
Hi Craig.

Well, if you set the EOT behavior to demote the account, then checking his level may be enough to know if he's subscribed. If he's at Level 1 or higher he's subscribed, if Level 0 or lower then not. Would that work?