Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:50:29-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13084 2011-12-20T09:50:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=57820#p57820 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:50 am


]]>
2011-12-07T01:03:37-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=55502#p55502 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: December 7, 2011, 1:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:03 am


]]>
2011-11-05T19:26:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=51876#p51876 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: November 5, 2011, 8:26 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:26 pm


]]>
2011-10-29T20:35:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=49971#p49971 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: October 29, 2011, 9:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:35 pm


]]>
2011-10-17T15:39:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=47765#p47765 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: October 17, 2011, 1:39 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:39 pm


]]>
2011-10-11T14:35:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=46166#p46166 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: October 11, 2011, 12:35 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:35 pm


]]>
2011-10-03T15:47:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=44296#p44296 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: October 3, 2011, 1:47 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:47 pm


]]>
2011-10-03T03:41:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=43003#p43003 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: October 3, 2011, 1:41 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:41 am


]]>
2011-09-27T05:26:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=41249#p41249 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: September 27, 2011, 3:26 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:26 am


]]>
2011-09-26T21:03:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=40005#p40005 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:03 pm


]]>
2011-09-17T16:20:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=38147#p38147 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: September 17, 2011, 2:20 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:20 pm


]]>
2011-09-14T01:28:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=36728#p36728 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: September 13, 2011, 11:28 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:28 am


]]>
2011-09-13T12:03:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=35456#p35456 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: September 13, 2011, 10:03 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:03 pm


]]>
2011-08-15T15:14:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=31577#p31577 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: August 15, 2011, 4:14 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\user-deletions.inc.php ?php /** * User deletion routines. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\User_Deletions * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_user_deletions" ) ) { /** * User deletion routines. * * @package s2Member\User_Deletions * @since 3.5 */ class c_ws_plugin__s2member_user_deletions { /** * Handles Multisite User removal deletions. * * @package s2Member\User_Deletions * @since 3.5 * * @attaches-to: ``add_action("remove_user_from_blog");`` * * @param int|str $user_id Numeric WordPress® User ID. * @param int|str $blog_id Numeric WordPress® Blog ID. * @param bool $s2says Optional. Defaults to false. If true, it's definitely OK to process this deletion? * The ``$s2says`` flag can be used when/if the routine is called directly for whatever reason. * @return null */ public static function handle_ms_user_deletions ( $user_id = FALSE , $blog_id = FALSE , $s2says = FALSE ) { static $processed = array ( ) ; /* No duplicate processing. */ global $pagenow ; /* Need this to detect the current admin page. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_handle_ms_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( is_multisite ( ) && empty ( $processed [ $user_id ] ) ) /* Safeguard this routine against duplicate processing. */ { if ( ( $s2says || (is_blog_admin ( ) && $pagenow === "users.php" ) ) && ( $processed [ $user_id ] = true ) ) /* Do NOT react on this globally. There are many routines that remove Users for different/minor reasons. */ { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_handle_ms_user_deletions_before" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ c_ws_plugin__s2member_user_deletions:: handle_user_deletions ( $user_id ) ; /* Hand this over. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_handle_ms_user_deletions_after" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_handle_ms_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* Return for uniformity. */ } /** * Handles User removals/deletions. * * @package s2Member\User_Deletions * @since 3.5 * * @attaches-to: ``add_action("delete_user");`` * @attaches-to: ``add_action("wpmu_delete_user");`` * * @param int|str $user_id Numeric WordPress® User ID. * @return null */ public static function handle_user_deletions ( $user_id = FALSE ) { static $processed = array ( ) ; /* No duplicate processing. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_handle_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( empty ( $processed [ $user_id ] ) && ( $processed [ $user_id ] = true ) ) /* Safeguard this routine against duplicate processing. */ { $eot_del_type = /* Configure EOT/Del type ( possibly through a global variable made available in other routines ). */ ( ! empty ( $GLOBALS [ "ws_plugin__s2member_eot_del_type" ] ) ) ? /* Is the global available for use? */ $GLOBALS [ "ws_plugin__s2member_eot_del_type" ] : "user-removal-deletion" ; /* Else use default. */ /**/ $custom = get_user_option ( "s2member_custom" , $user_id ) ; /* An EOT Notification is triggered, EVEN if empty. */ $subscr_id = get_user_option ( "s2member_subscr_id" , $user_id ) ; /* And also, EVEN if this is empty. */ $fields = get_user_option ( "s2member_custom_fields" , $user_id ) ; /* Used in API Notifications. */ $user_reg_ip = get_user_option ( "s2member_registration_ip" , $user_id ) ; /* In API Notifications. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_handle_user_before_deletions" , get_defined_vars ( ) ) ; do_action ( "ws_plugin__s2member_during_collective_eots" , $user_id , get_defined_vars ( ) , $eot_del_type , "removal-deletion" ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ delete_user_option ( $user_id , "s2member_custom" ) ; /* Now we can remove these User options ( for this Blog ). */ delete_user_option ( $user_id , "s2member_subscr_id" ) ; /* The `wpmu_delete_user` Hook also handles this. */ delete_user_option ( $user_id , "s2member_subscr_gateway" ) ; delete_user_option ( $user_id , "s2member_registration_ip" ) ; /**/ delete_user_option ( $user_id , "s2member_sp_references" ) ; delete_user_option ( $user_id , "s2member_ipn_signup_vars" ) ; delete_user_option ( $user_id , "s2member_paid_registration_times" ) ; delete_user_option ( $user_id , "s2member_first_payment_txn_id" ) ; delete_user_option ( $user_id , "s2member_last_payment_time" ) ; delete_user_option ( $user_id , "s2member_last_status_scan" ) ; delete_user_option ( $user_id , "s2member_auto_eot_time" ) ; delete_user_option ( $user_id , "s2member_login_counter" ) ; delete_user_option ( $user_id , "s2member_notes" ) ; /**/ delete_user_option ( $user_id , "s2member_file_download_access_arc" ) ; delete_user_option ( $user_id , "s2member_file_download_access_log" ) ; /**/ if ( is_object ( $user = new WP_User ( $user_id ) ) && $user - ID && $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 ( "/%%eot_del_type%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $eot_del_type ) ) , $url ) ) && ( $url = preg_replace ( "/%%subscr_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $subscr_id ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_first_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - first_name ) ) , $url ) ) && ( $url = preg_replace ( "/%%user_last_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - last_name ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_full_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( trim ( $user - first_name . " " . $user - last_name ) ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_email%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - user_email ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_login%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - user_login ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_ip%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user_reg_ip ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user_id ) ) , $url ) ) ) { if ( is_array ( $fields ) && ! empty ( $fields ) ) foreach ( $fields as $var = $val ) /* Custom Registration Fields. */ if ( ! ( $url = preg_replace ( "/%%" . preg_quote ( $var , "/" ) . "%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( maybe_serialize ( $val ) ) ) , $url ) ) ) break ; /**/ if ( ( $url = trim ( preg_replace ( "/%%(.+?)%%/i" , "" , $url ) ) ) ) c_ws_plugin__s2member_utils_urls:: remote ( $url ) ; } } /**/ if ( is_object ( $user = new WP_User ( $user_id ) ) && $user - ID && $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "eot_del_notification_recipients" ] && is_array ( $cv = preg_split ( "/\|/" , $custom ) ) ) { c_ws_plugin__s2member_email_configs:: email_config_release ( ) ; /* Release all Filters applied to wp_mail() From: headers. */ /**/ $msg = $sbj = "( s2Member / API Notification Email ) - EOT/Deletion" ; $msg .= "\n \n" ; /* Spacing in the message body. */ /**/ $msg .= "eot_del_type: %%eot_del_type%% \n" ; $msg .= "subscr_id: %%subscr_id%% \n" ; $msg .= "user_first_name: %%user_first_name%% \n" ; $msg .= "user_last_name: %%user_last_name%% \n" ; $msg .= "user_full_name: %%user_full_name%% \n" ; $msg .= "user_email: %%user_email%% \n" ; $msg .= "user_login: %%user_login%% \n" ; $msg .= "user_ip: %%user_ip%% \n" ; $msg .= "user_id: %%user_id%% \n" ; /**/ if ( is_array ( $fields ) && ! empty ( $fields ) ) foreach ( $fields as $var = $val ) $msg .= $var . ": %%" . $var . "%% \n" ; /**/ $msg .= "cv0: %%cv0%% \n" ; $msg .= "cv1: %%cv1%% \n" ; $msg .= "cv2: %%cv2%% \n" ; $msg .= "cv3: %%cv3%% \n" ; $msg .= "cv4: %%cv4%% \n" ; $msg .= "cv5: %%cv5%% \n" ; $msg .= "cv6: %%cv6%% \n" ; $msg .= "cv7: %%cv7%% \n" ; $msg .= "cv8: %%cv8%% \n" ; $msg .= "cv9: %%cv9%%" ; /**/ if ( ( $msg = preg_replace ( "/%%cv([0-9]+)%%/ei" , 'trim($cv[$1])' , $msg ) ) && ( $msg = preg_replace ( "/%%eot_del_type%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $eot_del_type ) , $msg ) ) && ( $msg = preg_replace ( "/%%subscr_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $subscr_id ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_first_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - first_name ) , $msg ) ) && ( $msg = preg_replace ( "/%%user_last_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - last_name ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_full_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( trim ( $user - first_name . " " . $user - last_name ) ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_email%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - user_email ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_login%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - user_login ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_ip%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user_reg_ip ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user_id ) , $msg ) ) ) { if ( is_array ( $fields ) && ! empty ( $fields ) ) foreach ( $fields as $var = $val ) /* Custom Registration Fields. */ if ( ! ( $msg = preg_replace ( "/%%" . preg_quote ( $var , "/" ) . "%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( maybe_serialize ( $val ) ) , $msg ) ) ) break ; /**/ if ( ( $msg = trim ( preg_replace ( "/%%(.+?)%%/i" , "" , $msg ) ) ) ) foreach (c_ws_plugin__s2member_utils_strings:: trim_deep ( preg_split ( "/;+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "eot_del_notification_recipients" ] ) ) as $recipient ) ( $recipient ) ? wp_mail ( $recipient , apply_filters ( "ws_plugin__s2member_eot_del_notification_email_sbj" , $sbj , get_defined_vars ( ) ) , apply_filters ( "ws_plugin__s2member_eot_del_notification_email_msg" , $msg , get_defined_vars ( ) ) , "From: \"" . preg_replace ( '/"/' , "'" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "reg_email_from_name" ] ) . "\" " . $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "reg_email_from_email" ] . "\r \nContent-Type: text/plain; charset=utf-8" ) : null ; } } /**/ 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. */ } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_handle_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member\includes\classes\user-deletions.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:14 pm


]]>
2011-07-11T17:30:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=27747#p27747 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: July 11, 2011, 6:30 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\user-deletions.inc.php ?php /** * User deletion routines. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\User_Deletions * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_user_deletions" ) ) { /** * User deletion routines. * * @package s2Member\User_Deletions * @since 3.5 */ class c_ws_plugin__s2member_user_deletions { /** * Handles Multisite User removal deletions. * * @package s2Member\User_Deletions * @since 3.5 * * @attaches-to: ``add_action("remove_user_from_blog");`` * * @param int|str $user_id Numeric WordPress® User ID. * @param int|str $blog_id Numeric WordPress® Blog ID. * @param bool $s2says Optional. Defaults to false. If true, it's definitely OK to process this deletion? * The ``$s2says`` flag can be used when/if the routine is called directly for whatever reason. * @return null */ public static function handle_ms_user_deletions ( $user_id = FALSE , $blog_id = FALSE , $s2says = FALSE ) { static $processed = array ( ) ; /* No duplicate processing. */ global $pagenow ; /* Need this to detect the current admin page. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_handle_ms_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( is_multisite ( ) && empty ( $processed [ $user_id ] ) ) /* Safeguard this routine against duplicate processing. */ { if ( ( $s2says || (is_blog_admin ( ) && $pagenow === "users.php" ) ) && ( $processed [ $user_id ] = true ) ) /* Do NOT react on this globally. There are many routines that remove Users for different/minor reasons. */ { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_handle_ms_user_deletions_before" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ c_ws_plugin__s2member_user_deletions:: handle_user_deletions ( $user_id ) ; /* Hand this over. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_handle_ms_user_deletions_after" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ } } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_handle_ms_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* Return for uniformity. */ } /** * Handles User removals/deletions. * * @package s2Member\User_Deletions * @since 3.5 * * @attaches-to: ``add_action("delete_user");`` * @attaches-to: ``add_action("wpmu_delete_user");`` * * @param int|str $user_id Numeric WordPress® User ID. * @return null */ public static function handle_user_deletions ( $user_id = FALSE ) { static $processed = array ( ) ; /* No duplicate processing. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_handle_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( empty ( $processed [ $user_id ] ) && ( $processed [ $user_id ] = true ) ) /* Safeguard this routine against duplicate processing. */ { $eot_del_type = /* Configure EOT/Del type ( possibly through a global variable made available in other routines ). */ ( ! empty ( $GLOBALS [ "ws_plugin__s2member_eot_del_type" ] ) ) ? /* Is the global available for use? */ $GLOBALS [ "ws_plugin__s2member_eot_del_type" ] : "user-removal-deletion" ; /* Else use default. */ /**/ $custom = get_user_option ( "s2member_custom" , $user_id ) ; /* An EOT Notification is triggered, EVEN if empty. */ $subscr_id = get_user_option ( "s2member_subscr_id" , $user_id ) ; /* And also, EVEN if this is empty. */ $fields = get_user_option ( "s2member_custom_fields" , $user_id ) ; /* Used in API Notifications. */ $user_reg_ip = get_user_option ( "s2member_registration_ip" , $user_id ) ; /* In API Notifications. */ /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_during_handle_user_before_deletions" , get_defined_vars ( ) ) ; do_action ( "ws_plugin__s2member_during_collective_eots" , $user_id , get_defined_vars ( ) , $eot_del_type , "removal-deletion" ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ delete_user_option ( $user_id , "s2member_custom" ) ; /* Now we can remove these User options ( for this Blog ). */ delete_user_option ( $user_id , "s2member_subscr_id" ) ; /* The `wpmu_delete_user` Hook also handles this. */ delete_user_option ( $user_id , "s2member_subscr_gateway" ) ; delete_user_option ( $user_id , "s2member_registration_ip" ) ; /**/ delete_user_option ( $user_id , "s2member_sp_references" ) ; delete_user_option ( $user_id , "s2member_ipn_signup_vars" ) ; delete_user_option ( $user_id , "s2member_paid_registration_times" ) ; delete_user_option ( $user_id , "s2member_first_payment_txn_id" ) ; delete_user_option ( $user_id , "s2member_last_payment_time" ) ; delete_user_option ( $user_id , "s2member_last_status_scan" ) ; delete_user_option ( $user_id , "s2member_auto_eot_time" ) ; delete_user_option ( $user_id , "s2member_notes" ) ; /**/ delete_user_option ( $user_id , "s2member_file_download_access_arc" ) ; delete_user_option ( $user_id , "s2member_file_download_access_log" ) ; /**/ if ( is_object ( $user = new WP_User ( $user_id ) ) && $user - ID && $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 ( "/%%eot_del_type%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $eot_del_type ) ) , $url ) ) && ( $url = preg_replace ( "/%%subscr_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $subscr_id ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_first_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - first_name ) ) , $url ) ) && ( $url = preg_replace ( "/%%user_last_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - last_name ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_full_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( trim ( $user - first_name . " " . $user - last_name ) ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_email%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - user_email ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_login%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user - user_login ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_ip%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user_reg_ip ) ) , $url ) ) ) if ( ( $url = preg_replace ( "/%%user_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( $user_id ) ) , $url ) ) ) { if ( is_array ( $fields ) && ! empty ( $fields ) ) foreach ( $fields as $var = $val ) /* Custom Registration Fields. */ if ( ! ( $url = preg_replace ( "/%%" . preg_quote ( $var , "/" ) . "%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( urlencode ( maybe_serialize ( $val ) ) ) , $url ) ) ) break ; /**/ if ( ( $url = trim ( preg_replace ( "/%%(.+?)%%/i" , "" , $url ) ) ) ) c_ws_plugin__s2member_utils_urls:: remote ( $url ) ; } } /**/ if ( is_object ( $user = new WP_User ( $user_id ) ) && $user - ID && $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "eot_del_notification_recipients" ] && is_array ( $cv = preg_split ( "/\|/" , $custom ) ) ) { c_ws_plugin__s2member_email_configs:: email_config_release ( ) ; /* Release all Filters applied to wp_mail() From: headers. */ /**/ $msg = $sbj = "( s2Member / API Notification Email ) - EOT/Deletion" ; $msg .= "\n \n" ; /* Spacing in the message body. */ /**/ $msg .= "eot_del_type: %%eot_del_type%% \n" ; $msg .= "subscr_id: %%subscr_id%% \n" ; $msg .= "user_first_name: %%user_first_name%% \n" ; $msg .= "user_last_name: %%user_last_name%% \n" ; $msg .= "user_full_name: %%user_full_name%% \n" ; $msg .= "user_email: %%user_email%% \n" ; $msg .= "user_login: %%user_login%% \n" ; $msg .= "user_ip: %%user_ip%% \n" ; $msg .= "user_id: %%user_id%% \n" ; /**/ if ( is_array ( $fields ) && ! empty ( $fields ) ) foreach ( $fields as $var = $val ) $msg .= $var . ": %%" . $var . "%% \n" ; /**/ $msg .= "cv0: %%cv0%% \n" ; $msg .= "cv1: %%cv1%% \n" ; $msg .= "cv2: %%cv2%% \n" ; $msg .= "cv3: %%cv3%% \n" ; $msg .= "cv4: %%cv4%% \n" ; $msg .= "cv5: %%cv5%% \n" ; $msg .= "cv6: %%cv6%% \n" ; $msg .= "cv7: %%cv7%% \n" ; $msg .= "cv8: %%cv8%% \n" ; $msg .= "cv9: %%cv9%%" ; /**/ if ( ( $msg = preg_replace ( "/%%cv([0-9]+)%%/ei" , 'trim($cv[$1])' , $msg ) ) && ( $msg = preg_replace ( "/%%eot_del_type%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $eot_del_type ) , $msg ) ) && ( $msg = preg_replace ( "/%%subscr_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $subscr_id ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_first_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - first_name ) , $msg ) ) && ( $msg = preg_replace ( "/%%user_last_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - last_name ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_full_name%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( trim ( $user - first_name . " " . $user - last_name ) ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_email%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - user_email ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_login%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user - user_login ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_ip%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user_reg_ip ) , $msg ) ) ) if ( ( $msg = preg_replace ( "/%%user_id%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( $user_id ) , $msg ) ) ) { if ( is_array ( $fields ) && ! empty ( $fields ) ) foreach ( $fields as $var = $val ) /* Custom Registration Fields. */ if ( ! ( $msg = preg_replace ( "/%%" . preg_quote ( $var , "/" ) . "%%/i" , c_ws_plugin__s2member_utils_strings:: esc_ds ( maybe_serialize ( $val ) ) , $msg ) ) ) break ; /**/ if ( ( $msg = trim ( preg_replace ( "/%%(.+?)%%/i" , "" , $msg ) ) ) ) foreach (c_ws_plugin__s2member_utils_strings:: trim_deep ( preg_split ( "/;+/" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "eot_del_notification_recipients" ] ) ) as $recipient ) ( $recipient ) ? wp_mail ( $recipient , apply_filters ( "ws_plugin__s2member_eot_del_notification_email_sbj" , $sbj , get_defined_vars ( ) ) , apply_filters ( "ws_plugin__s2member_eot_del_notification_email_msg" , $msg , get_defined_vars ( ) ) , "From: \"" . preg_replace ( '/"/' , "'" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "reg_email_from_name" ] ) . "\" " . $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "reg_email_from_email" ] . "\r \nContent-Type: text/plain; charset=utf-8" ) : null ; } } /**/ 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. */ } /**/ eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_after_handle_user_deletions" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member\includes\classes\user-deletions.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:30 pm


]]>
2011-07-09T06:10:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13084&p=25379#p25379 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\user-deletions.inc.php
Docs updated: December 20, 2011, 9:50 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:10 am


]]>