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.

Home Forums RH

About: RH

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
Setting Up EOT Notifications

By:  Bruce in: Unofficial Extensions/Hacks

voices: 16
replies: 21

2 years, 11 months ago  Kristen Symonds

Request Refund

By:  RH in: Community Forum

voices: 2
replies: 4

3 years, 5 months ago  Bruce

Pro Forms doesn't detect logged in user

By:  RH in: Community Forum

voices: 3
replies: 24

3 years, 5 months ago  Cristián Lávaque

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

Topics I've Started

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
Request Refund

By:  RH in: Community Forum

voices: 2
replies: 4

3 years, 5 months ago  Bruce

Pro Forms doesn't detect logged in user

By:  RH in: Community Forum

voices: 3
replies: 24

3 years, 5 months ago  Cristián Lávaque

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

My Latest Replies (From Various Topics)

Viewing 15 replies - 1 through 15 (of 15 total)
Author Replies
Author Replies
Posted: Thursday Jul 25th, 2013 at 4:05 pm #54094
RH
Username: s2pm

I need the following functionality:

1. Orders management – I need to be able to manage an order as well as payments. s2Member only keeps track of what level a user has paid for. If a user pays for multiple levels, it only keeps track of the most recent subscription.
2. Multiple subscriptions/orders – I need to be able to manage/track multiple subscriptions/payments/orders per user. s2Member doesn’t allow this.
3. Payment history – I need to be able to view and provide the user an order history as well as payment history. s2Member can support this if I program it and I know this is something you are working on for the next version which is supposed to come out later this year, but I cannot wait that long.
4. Out of the box reports. I need various reports (that I do not have to program myself). s2Member does not provide this.

I thought the Pro Forms would provide the additional functionality, however, due to these limitations, I have have determined I cannot use s2Member at all for my website. I already uninstalled the plugin and removed it from my computer.

I would very much appreciate a refund.

Thank you.

Posted: Saturday Jul 20th, 2013 at 9:14 pm #53742
RH
Username: s2pm

I too am in need of this. Where can I get the beta version?

Posted: Thursday Jul 18th, 2013 at 7:06 pm #53667
RH
Username: s2pm

Here is the code I placed in s2hacks.php MU plugin file:

add_filter('script_loader_src', 's2hack_src_loader_filter');
add_filter('style_loader_src', 's2hack_src_loader_filter');

function s2hack_src_loader_filter($src)
{
  $src = str_ireplace("sub2.sub.networkdomain.com", "sub2.networkdomain.com", $src);
  return $src;
}

This is probably not typical for most WordPress Network installations, but in my unique case I had to install WordPress Network on a subdomain. This causes all my subsites to have two subdomains (sub2.sub, sub3.sub, etc.). This causes problems with a lot of Urls.

Posted: Thursday Jul 18th, 2013 at 5:46 pm #53663
RH
Username: s2pm

You might want to since I think support stopped responding to me on this thread. I’ve noticed they only respond once or twice per thread.

Posted: Thursday Jul 18th, 2013 at 5:31 pm #53660
RH
Username: s2pm

I finally figured it out. It was because of the MU Domain Mapping. The script location was the network subsite domain (sub.networkdomain.tld), but the website cookies were only for the mapped domain (www.mappeddomain.tld). Once I changed the location of the script, it loaded the correct values.

Hopefully this helps other people using WordPress MU (Network) with the WordPress MU Domain Mapping plugin.

The way I fixed this was to enabled a plugin that replaced all instances of “sub.networkdomain.tld” with “www.mappeddomain.tld” in the output html.

Posted: Thursday Jul 18th, 2013 at 5:11 pm #53657
RH
Username: s2pm

I have confirmed that in file “\s2member\includes\classes\css-js-themes.inc.php:82” it is correctly detecting I am logged in and the constant “S2MEMBER_CURRENT_USER_IS_LOGGED_IN” outputs true. So, the problem lies with the “\s2member\includes\classes\css-js-in.inc.php” file not loading the constants.

Posted: Thursday Jul 18th, 2013 at 4:53 pm #53656
RH
Username: s2pm

So, I have tracked it down to this file “\s2member\includes\classes\constants.inc.php:156” setting the value “S2MEMBER_CURRENT_USER_IS_LOGGED_IN” to true when I am logged in. And echoing it out to the screen I confirm it is working.

However, when it gets to this file “\s2member\includes\classes\css-js-in.inc.php:105” when echoing “S2MEMBER_CURRENT_USER_IS_LOGGED_IN” out to the screen, it is false.

Posted: Thursday Jul 18th, 2013 at 4:05 pm #53654
RH
Username: s2pm

I have tested it with three computers on different networks, in IE10, Firefox, Chrome and Safari. Even on my iPhone. They all do the same thing. They don’t recognize the logged in user when using the ProForms.

Posted: Thursday Jul 18th, 2013 at 3:49 pm #53652
RH
Username: s2pm

The weirdest thing is, when I log out as Administrator and then log in as a registered member, it shows “Your Profile”, but shows the administrator email and username. So, I delete my cache and cookies, then log in as a registered member again, this time it says “Create Profile” and the username and email are blank.

I am running Firebug and FirePHP to debug what is going on (and yes, I tested it without FirePHP to make sure that wasn’t conflicting either). As soon as I log in, I look at the PHP Variables and notice that “S2MEMBER_CURRENT_USER_LOGIN” is empty and “S2MEMBER_CURRENT_USER_IS_LOGGED_IN” is false. So, these values are not being set after logging in.

Posted: Thursday Jul 18th, 2013 at 3:29 pm #53650
RH
Username: s2pm

The code that changes the form depending on if the user is logged in, is below. I’m still trying to trace down why it’s not working:

\s2member-pro\includes\separates\gateways\paypal\paypal.js:601

(handleExistingUsers = /* eventTrigger is passed by jQuery for DOM events. */ function(eventTrigger)
	{
		if /* If User/Member is already logged in. */ (S2MEMBER_CURRENT_USER_IS_LOGGED_IN)
			{
				$(registrationSection + ' input#s2member-pro-paypal-checkout-first-name').each (function()
					{
						var $this = $(this), val = $this.val ();
						(!val) ? $this.val (S2MEMBER_CURRENT_USER_FIRST_NAME) : null;
					});

				$(registrationSection + ' input#s2member-pro-paypal-checkout-last-name').each (function()
					{
						var $this = $(this), val = $this.val ();
						(!val) ? $this.val (S2MEMBER_CURRENT_USER_LAST_NAME) : null;
					});

				$(registrationSection + ' input#s2member-pro-paypal-checkout-email').val (S2MEMBER_CURRENT_USER_EMAIL).attr (ariaFalseDis);
				$(registrationSection + ' input#s2member-pro-paypal-checkout-username').val (S2MEMBER_CURRENT_USER_LOGIN).attr (ariaFalseDis);

				$(registrationSection + ' > div#s2member-pro-paypal-checkout-form-password-div').hide ();
				$(registrationSection + ' > div#s2member-pro-paypal-checkout-form-password-div :input').attr (ariaFalseDis);

				if ($.trim ($(registrationSection + ' > div#s2member-pro-paypal-checkout-form-registration-section-title').html ()) === '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Create Profile", "s2member-front", "s2member")); ?>')
					$(registrationSection + ' > div#s2member-pro-paypal-checkout-form-registration-section-title').html ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Your Profile", "s2member-front", "s2member")); ?>');

				$(customFieldsSection).hide (), $(customFieldsSection + ' :input').attr (ariaFalseDis);
			}
	}) ();
Posted: Thursday Jul 18th, 2013 at 10:10 am #53634
RH
Username: s2pm

I found where $_p is being set, it was at the top of the Registration code:

$_p = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($_POST));

When I print_r($_p), it is an empty array.

Should I be posting something to the page that has the ProForm on it?

Posted: Thursday Jul 18th, 2013 at 10:00 am #53633
RH
Username: s2pm

Going into the code where it generates the Pro Form (\s2member-pro\includes\classes\gateways\paypal\paypal-form-in.inc.php:736), I found this line:

$code = preg_replace("/%%username_value%%/", c_ws_plugin__s2member_utils_strings::esc_ds(format_to_edit($_p["s2member_pro_paypal_checkout"]["username"])), $code);

When echoing ($_p[“s2member_pro_paypal_checkout”][“username”]) to the screen, it is blank (even though I am logged in). However, if I replace it with:

$current_user = wp_get_current_user();
$code = preg_replace("/%%username_value%%/", c_ws_plugin__s2member_utils_strings::esc_ds(format_to_edit($current_user->user_login)), $code);

Then, that shows my username.

I can’t find where $_p[“s2member_pro_paypal_checkout”][“username”] is supposed to be populated. Maybe I am missing a step before showing the ProForm? Does that value have to be populated from a previous form post or something?

Posted: Thursday Jul 18th, 2013 at 9:31 am #53626
RH
Username: s2pm

I have disabled all plugins except s2Member and MU Domain Mapping plugins (as I am running a Network and it would be break if I disabled the domain mapping). I also disabled all MU plugins (s2Hacks). I have switched the theme back to Twenty Twelve. I have cleared MySQL query cache, stopped the server, changed the my.cnf file and set query_cache_size=0. Then started the server again. I cleared my browser cache and cookies. I logged out, logged back in, went to the Pro Forms and still says “Create Profile”.

Posted: Wednesday Jul 17th, 2013 at 6:17 pm #53588
RH
Username: s2pm

I have query caching enabled at the MySQL server level. I can’t see why that would be the problem since WordPress and s2Member know when I am logged in and logged out, it’s only the Pro Forms having the problem. I don’t have any caching plugins activated. I have disabled all non-essential plugins. I have ran the S2Member Server Scanner with green checks across the board. All plugins and themes are up to date.

Posted: Tuesday Jul 16th, 2013 at 2:33 pm #53523
RH
Username: s2pm

So when I am logged in, it asks me to create a profile. But, when I am logged out, it says “Your Profile” and shows my email and username. I have cleared my browser cache and cookies. Now it just says “Create Profile” regardless if I am logged in or logged out.

If I use the form, it works fine, but I have to enter my username even though I am logged in.

Viewing 15 replies - 1 through 15 (of 15 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.