# s2member/110913/includes/menu-pages/code-samples/current-user-subscr-id.php

s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls &amp; Member Access Subscriptions, version 110913. 10 lines.

- Page: https://pluginprobe.com/plugins/s2member/110913/code/includes/menu-pages/code-samples/current-user-subscr-id.php
- Raw: https://pluginprobe.com/plugins/s2member/110913/raw/includes/menu-pages/code-samples/current-user-subscr-id.php
- Modified: 2011-09-14T05:54:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/s2member/110913/code/includes/menu-pages/code-samples/current-user-subscr-id.php#L10-L20`.

```php
<?php echo S2MEMBER_CURRENT_USER_SUBSCR_ID; ?>
This may output something like: I-82234JD0923423

This is the Paid Subscription ID associated with their account.
Or, for Lifetime subscriptions sold through Buy Now buttons, this will hold the Paid Transaction ID associated with their purchase.
Or, if the User is a Free Subscriber ( i.e. NOT a paying Member ), this will simply be an empty string.

---- s2member Shortcode Equivalent ----

[s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_ID" /]
```
