Skip to content

Instantly share code, notes, and snippets.

@ZellSnippets
Created February 6, 2014 01:06
Show Gist options
  • Save ZellSnippets/8836649 to your computer and use it in GitHub Desktop.
Save ZellSnippets/8836649 to your computer and use it in GitHub Desktop.
PHP: s2member codes
<?php
$user_login = get_user_field ("user_login");
# Username for the current User.
$user_email = get_user_field ("user_email");
# Email Address for the current User.
$first_name = get_user_field ("first_name");
# First Name for the current User.
$last_name = get_user_field ("last_name");
# Last Name for the current User.
$full_name = get_user_field ("full_name");
# First and Last Name for the current User.
$display_name = get_user_field ("display_name");
# Display Name for the current User.
$s2member_custom = get_user_field ("s2member_custom");
# Custom String value for the current User.
$s2member_subscr_id = get_user_field ("s2member_subscr_id");
# Paid Subscr. ID for the current User.
$s2member_subscr_or_wp_id = get_user_field ("s2member_subscr_or_wp_id");
# Paid Subscr. ID, else WordPress® User ID.
$s2member_subscr_gateway = get_user_field ("s2member_subscr_gateway");
# Paid Subscr. Gateway Code for the current User.
$s2member_registration_ip = get_user_field ("s2member_registration_ip");
# IP the current User had during registration.
$s2member_custom_fields = get_user_field ("s2member_custom_fields");
# Associative array of all Custom Registration/Profile Fields.
$s2member_file_download_access_log = get_user_field ("s2member_file_download_access_log");
# Associative array of all File Downloads by the current User, in the current Period ( Period is based on a specific User'sallowed_days, configured in your Basic Download Restrictions, at the User's current Membership Level ).
$s2member_file_download_access_arc = get_user_field ("s2member_file_download_access_arc");
# Associative array of all File Downloads by the current User, in previous Periods ( Periods are based on a specific User'sallowed_days, configured in your Basic Download Restrictions, at the User's Membership Levels in the past ).
$s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time");
# Auto EOT-Time for the current User ( when applicable ).
$s2member_last_payment_time = get_user_field ("s2member_last_payment_time");
# Timestamp. Last time an actual payment was received by s2Member.
$s2member_paid_registration_times = get_user_field ("s2member_paid_registration_times");
# Timestamps. Associative array of all Paid Registration Times.
$s2member_access_role = get_user_field ("s2member_access_role");
# A WordPress® Role ID ( i.e. s2member_level[0-9]+, administrator, editor, author, contributor, subscriber ).
$s2member_access_level = get_user_field ("s2member_access_level");
# An s2Member Membership Access Level number.
$s2member_access_label = get_user_field ("s2member_access_label");
# An s2Member Membership Access Label ( i.e. Bronze, Gold, Silver, Platinum, or whatever is configured ).
$s2member_access_ccaps = get_user_field ("s2member_access_ccaps");
# An array of Custom Capabilities the current User has ( i.e. music,videos ).
$s2member_login_counter = get_user_field ("s2member_login_counter");
# Number of times the User has logged into your site.
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment