latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Ralph Cabage

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 3 topics - 1 through 3 (of 3 total)
Topic Count Last Reply
S2Member Pro wifth Relevanssi Search Plugin

By:  Ralph Cabage in: Community Forum

voices: 2
replies: 1

4 years, 3 months ago  Philly

Need to Pre-Qualify Members

By:  Ralph Cabage in: Community Forum

voices: 2
replies: 7

4 years, 5 months ago  Raam Dev

S2Mmber registrant Database

By:  Ralph Cabage in: Community Forum

voices: 3
replies: 6

4 years, 6 months ago  Ralph Cabage

Viewing 3 topics - 1 through 3 (of 3 total)

Topics I've Started

Viewing 3 topics - 1 through 3 (of 3 total)
Topic Count Last Reply
S2Member Pro wifth Relevanssi Search Plugin

By:  Ralph Cabage in: Community Forum

voices: 2
replies: 1

4 years, 3 months ago  Philly

Need to Pre-Qualify Members

By:  Ralph Cabage in: Community Forum

voices: 2
replies: 7

4 years, 5 months ago  Raam Dev

S2Mmber registrant Database

By:  Ralph Cabage in: Community Forum

voices: 3
replies: 6

4 years, 6 months ago  Ralph Cabage

Viewing 3 topics - 1 through 3 (of 3 total)

My Latest Replies (From Various Topics)

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Tuesday Aug 7th, 2012 at 7:13 pm #21430
Ralph Cabage
Username: rcabage

Thank you Raam!

OOPS! I aplogize for the php header statement where I forgot to add the “Location: “attribute to the php header command. Thank you for that!

However, the s2Member Remote operations API has in their example for me to add the activation key and it is shown in the example, so my question is (1) why does it not work and (2) do I need to have the activation key stored in a wp_uers record to be able to access my web site? Please see the s2Member code below:

<?php
$op["op"] = "create_user"; /* The Remote Operation you're calling upon. */
/**/
$op["api_key"] = "869ef8342b0f806b0eafcb6309e0f40e"; /* Your Remote Ops API Key. */
/* Check your Dashboard for this value, under: `s2Member -> API Scripting -> Remote Operations API`. */
/**/
$op["data"] = array (/**/
"user_login" => "johndoe22", /* Required. A unique Username. Lowercase alphanumerics/underscores. */
"user_email" => "johndoe22@example.com", /* Required. A valid/unique Email Address for the new User. */
"user_pass" => "456DkaIjsd!", /* Optional. Plain text Password. If empty, one will be generated. */
"first_name" => "John", /* Optional. First Name for the new User. */
"last_name" => "Doe", /* Optional. Last Name for the new User. */
"s2member_level" => "2", /* Optional. Defaults to Level #0 ( a Free Subscriber ). */
"s2member_ccaps" => "music,videos", /* Optional. Comma-delimited list of Custom Capabilities. */
"s2member_registration_ip" => "123.456.789.100", /* Optional. User's IP Address. If empty, s2Member will fill this upon first login. */
"s2member_subscr_gateway" => "paypal", /* Optional. User's Paid Subscr. Gateway Code. One of: (paypal|alipay|authnet|ccbill|clickbank|google). */
"s2member_subscr_id" => "I-DJASODJF8933J", /* Optional. User's Paid Subscr. ID. For PayPal®, use their Subscription ID, or Recurring Profile ID. */
"s2member_custom" => "aqualifedealers.com", /* Optional. If provided, should always start with your installation domain name ( i.e. $_SERVER["HTTP_HOST"] ). */
"s2member_auto_eot_time" => "2030-12-25", /* Optional. Can be any value that PHP's ``strtotime()`` function will understand ( i.e. YYYY-MM-DD ). */
"opt_in" => "1", /* Optional. A non-zero value tells s2Member to attempt to process List Servers that you've configured in the Dashboard area. */
"custom_fields" => array ("my_field_id" => "Some value."), /* Optional. An array of Custom Registration Field ID's, with associative values. */
"s2member_notes" => "Administrative notation. Created this User via API call.", /* Optional. Administrative notations. */
"notification" => "1", /* Optional. A non-zero value tells s2Member to email the new User/Member their Username/Password. */
/* The "notification" parameter also tells s2Member to notify the site Administrator about this new account. */
);
/**/
$result = trim (file_get_contents ("http://aqualifedealers.com/?s2member_pro_remote_op=1", false, stream_context_create (array ("http" => array ("method" => "POST", "header" => "Content-type: application/x-www-form-urlencoded", "content" => "s2member_pro_remote_op=" . urlencode (serialize ($op)))))));
/**/
if (!empty ($result) && !preg_match ("/^Error\:/i", $result) && is_array ($user = @unserialize ($result)))
    {
        echo "Success. New User created with ID: " . $user["ID"];
    }
else
    echo "API error reads: " . $result;
?> 
Posted: Sunday Aug 5th, 2012 at 6:35 pm #21190
Ralph Cabage
Username: rcabage

Raam:

My name is Jack and I work for Ralph who’s name is on the s2Member Pro account. No, he did not install the Pro version, so I did and read in the API Scripting Remote Operations on what to do to create a s2Member user.

I created a test script and was able to create a record in our MYSQL wp_users table. However, I have two problems:

(1) user_url and activation_key were not transferred.
(2) I have a php header statement that is supposed to redirect to a thank you web page, but the code did not redirect.

Below is my test script:

<?php
$op["op"] = "create_user"; /* The Remote Operation you're calling upon. */
$op["api_key"] = "869ef8342b0f806b0eafcb6309e0f40e"; /* Your Remote Ops API Key. */
$user_login="KTownJack";
$Email="jack.utano@comcast.net";
$Password="Password";
$first_name="Jack";
$last_name="Utano";
$URL="www.aqualifedealers.com";
$reg_date=date("Y-m-d");
$op["data"] = array (/**/
"user_login" => $user_login, /* Required. A unique Username. Lowercase alphanumerics/underscores. */
"user_email" => $Email, /* Required. A valid/unique Email Address for the new User. */
"user_pass" => $Password, /* Optional. Plain text Password. If empty, one will be generated. */
"first_name" => $first_name, /* Optional. First Name for the new User. */
"last_name" => $last_name, /* Optional. Last Name for the new User. */
"s2member_level" => "0", /* Optional. Defaults to Level #0 ( a Free Subscriber ). */
"user_url" => $URL, /* Optional. Member website URL */
"user_activation_key" => "869ef8342b0f806b0eafcb6309e0f40e", /* Aqualifedealers.com S2Member Activation Key */
"s2member_auto_eot_time" => $reg_date, /* Optional. Can be any value that PHP's ``strtotime()`` function will understand ( i.e. YYYY-MM-DD ). */
);
$result = trim (file_get_contents ("http://aqualifedealers.com/?s2member_pro_remote_op=1", false, stream_context_create (array ("http" => array ("method" => "POST", "header" => "Content-type: application/x-www-form-urlencoded", "content" => "s2member_pro_remote_op=" . urlencode (serialize ($op)))))));
header("http://www.aqualifedealers.com/membership-request-thank-you/");
?>

Thank You for all your assistance.

Take Care
Jack

Posted: Wednesday Aug 1st, 2012 at 6:57 pm #20948
Ralph Cabage
Username: rcabage

Thank You Raam:

Unfortunately, I I cannot find Dashboard -› s2Member® -› API / Scripting -› Remote Operations API.

Below are the options I have in Dashboard -› s2Member® -› API / Scripting

+The Extremely Easy WayThe Extremely Easy Way
+Simple/Shortcode ConditionalsSimple Conditionals
+Advanced/PHP ConditionalsThe Advanced Way
+Advanced/PHP Query ConditionalsAdvanced Query Conditionals
+Custom Capabilities ( Packages )
+Custom Capability & Member Level Files
+s2Member Content Dripping
+Member Profile Modifications
+s2Member PHP/API Constants
+s2Member JS/API Globals
+Membership Options Page / Variables
+Hooks/Filters ( For Developers )

Thank You

Posted: Saturday Jun 30th, 2012 at 6:51 pm #17991
Ralph Cabage
Username: rcabage

Raam

You CAN COUNT ON IT!!!

Thanks

Posted: Friday Jun 29th, 2012 at 9:40 am #17854
Ralph Cabage
Username: rcabage

Thank you for your suggestions. You suggestions have given me what I need to continue…

Posted: Wednesday Jun 27th, 2012 at 7:27 pm #17711
Ralph Cabage
Username: rcabage

Thank You for your Prompt Response:

Unfortunately, I was pulled to solve another issue and was just able to get to my question. Thank you for your response, but for more reasons you do not need gto know, I have to pre-qualify them with our form @

http://aqualifedealers.com/membership-application/

So, I have googled wp_users database and have not found any satisfactorly explanation of what to place in the wp_usrs fields.

I need to know what! you guys now place in each field BECAUSE you are using the wp_users database to enter s2member members.

So, once again, I am asking what do you enter for the following wp_users table fields:

user_login varchar(60)
user_pass varchar(64)
user_nicename varchar(50)
user_activation_key varchar(60)
user_status int(11)
display_name

So, for example, where do I place teh Roles/Capaibilites Permisssions”????\

Thank You!

Viewing 6 replies - 1 through 6 (of 6 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.