PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
if (is_object ($user = new WP_User ($user_id)) && $user->ID && $subscr_id && $custom && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_urls"] && is_array ($cv = preg_split ("/\|/", $custom)))
{
foreach (preg_split ("/[\r\n\t]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_urls"]) as $url) /* Handle eot notifications on user deletion. */
if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)) && ($url = preg_replace ("/%%subscr_id%%/i", ws_plugin__s2member_esc_ds (urlencode ($subscr_id)), $url)))
if (($url = preg_replace ("/%%user_first_name%%/i", ws_plugin__s2member_esc_ds (urlencode ($user->first_name)), $url)) && ($url = preg_replace ("/%%user_last_name%%/i", ws_plugin__s2member_esc_ds (urlencode ($user->last_name)), $url)))
if (($url = preg_replace ("/%%user_full_name%%/i", ws_plugin__s2member_esc_ds (urlencode (trim ($user->first_name . " " . $user->last_name))), $url)))
if (($url = preg_replace ("/%%user_email%%/i", ws_plugin__s2member_esc_ds (urlencode ($user->user_email)), $url)))
/**/
if (($url = trim ($url))) /* Empty? */
ws_plugin__s2member_remote ($url);
/**/
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action ("ws_plugin__s2member_during_handle_user_deletions", get_defined_vars ());
unset ($__refs, $__v); /* Unset defined __refs, __v. */
}
if (is_object ($user = new WP_User ($user_id)) && $user->ID && $subscr_id && $custom && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_urls"] && is_array ($cv = preg_split ("/\|/", $custom)))
$custom = get_usermeta ($user_id, "s2member_custom");
$subscr_id = get_usermeta ($user_id, "s2member_subscr_id");
$custom = get_usermeta ($user_id, "s2member_custom");
if (empty($custom) OR $custom =='' OR is_null($custom)) { $custom = true; }
$subscr_id = get_usermeta ($user_id, "s2member_subscr_id");
if (empty($subscr_id) OR $subscr_id =='' OR is_null($subscr_id)) { $subscr_id = true; }
I have a reason for EOT urls to be pinged when ANY user is deleted, not just ones that were originally paid members. I think s2member could change the documentation to explain this a little better OR (cross fingers) support the pinging of EOT URLS when ANY user is deleted
I love s2member but this little snafo cost me about 7.5 hours
To be clear, I don't think this is a bug ... I think s2member is behaving as it was designed, I just didn't find the design of this area particularly intuitive.
martonic wrote:Hi again Jason,
What about an EOT - will a notification now be sent when demotion occurs In all cases - even when there is no subscriber-id?
Users browsing this forum: Google [Bot] and 0 guests