Thread Rating:
  • 10 Vote(s) - 2.7 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN)
#90
(2016-09-13, 12:57 PM)Shade Wrote: Not sure if anyone has pointed this out already, but there's an issue with usergroups. File inc/plugins/mysubs.php, line 580:

					if($sub['accepted_gids'] != 'all')
						{
							$gids = explode(',', $user['additionalgroups']);
							$gids[] = $user['usergroup'];
							$matched = array_intersect($gids, explode(',', $sub['accepted_gids']));
							if(empty($matched)) $accepted_gid = false;
						}

This does not work as the $sub variable hasn't been initialized. Instead, you should use $item which is loaded with the actual subscription.

					if($item['accepted_gids'] != 'all')
						{
							$gids = explode(',', $user['additionalgroups']);
							$gids[] = $user['usergroup'];
							$matched = array_intersect($gids, explode(',', $item['accepted_gids']));
							if(empty($matched)) $accepted_gid = false;
						}

Without this correction, if one of the subscriptions has a blank field as allowed usergroups the whole process will fail.

Thanks, trying this out now. Hopefully works out for me.
Reply


Messages In This Thread
RE: MySubscriptions - Paypal IPN Plugin - by Zueq - 2012-07-31, 08:47 PM
RE: MySubscriptions - Paypal IPN Plugin - by JimR - 2014-02-22, 04:10 PM
RE: MySubscriptions - Paypal IPN Plugin - by ytt - 2014-10-03, 06:49 PM
RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - by Brody - 2018-05-10, 06:56 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)