s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) - Version 130406

Version Description

= v130406 = (Maintenance Release) Upgrade immediately.

Download this release

Release Info

Developer WebSharks
Plugin Icon 128x128 s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
Version 130406
Comparing to
See all releases

Code changes from version 130404 to 130406

checksum.txt CHANGED
@@ -1 +1 @@
1
- dd95a97ddfcfe1a0a334d9d9a42a522c
1
+ ebc230cc22eb153a6f57f791b3c0db0b
includes/classes/email-configs.inc.php CHANGED
@@ -174,6 +174,35 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
174
  return apply_filters ("ws_plugin__s2member_after_email_filter", $array, get_defined_vars ());
175
  }
176
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  * Handles new User/Member notifications.
178
  *
179
  * @package s2Member\Email_Configs
174
  return apply_filters ("ws_plugin__s2member_after_email_filter", $array, get_defined_vars ());
175
  }
176
  /**
177
+ * Resets a User/Member password and resends the New User Notification email message (to the User/Member only).
178
+ *
179
+ * @package s2Member\Email_Configs
180
+ * @since 110707
181
+ *
182
+ * @param str|int $user_id A numeric WordPress® User ID.
183
+ * @param str $user_pass Optional. A plain text version of the User's password.
184
+ * If omitted, a new password will be generated automatically.
185
+ * @param array $notify An array of directives. Must be non-empty, with at least one of these values `user,admin`.
186
+ This defaults to a value of `array('user')`. We notify the User/Member only (and NOT the administrator).
187
+ * @return bool True if all required parameters are supplied, else false.
188
+ */
189
+ public static function reset_pass_resend_new_user_notification ($user_id = FALSE, $user_pass = FALSE, $notify = array ("user"))
190
+ {
191
+ foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
192
+ do_action ("ws_plugin__s2member_before_reset_pass_resend_new_user_notification", get_defined_vars ());
193
+ unset /* Unset defined __refs, __v. */ ($__refs, $__v);
194
+
195
+ if ($user_id && ($user = new WP_User ($user_id)) && !empty ($user->ID) && ($user_id = $user->ID) && is_array ($notify) && !empty ($notify))
196
+ {
197
+ $user_pass = (is_string($user_pass) && $user_pass) ? $user_pass : wp_generate_password();
198
+
199
+ wp_set_password($user_pass, $user_id);
200
+
201
+ $return = c_ws_plugin__s2member_email_configs::new_user_notification($user_id, $user_pass, $notify);
202
+ }
203
+ return apply_filters ("ws_plugin__s2member_reset_pass_resend_new_user_notification", ((!empty($return)) ? true : false), get_defined_vars ());
204
+ }
205
+ /**
206
  * Handles new User/Member notifications.
207
  *
208
  * @package s2Member\Email_Configs
includes/classes/login-redirects.inc.php CHANGED
@@ -27,6 +27,31 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
27
  */
28
  class c_ws_plugin__s2member_login_redirects
29
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Handles login redirections.
32
  *
27
  */
28
  class c_ws_plugin__s2member_login_redirects
29
  {
30
+
31
+ /**
32
+ * Assists in multisite User authentication.
33
+ *
34
+ * @package s2Member\Login_Redirects
35
+ * @since 130405
36
+ *
37
+ * @attaches-to ``add_filter("wp_authenticate_user");``
38
+ *
39
+ * @param WP_User|WP_Error Expects either a WP_User or WP_Error object passed in by the Filter.
40
+ * @return WP_User|WP_Error WP_User or WP_Error object (if there was a problem).
41
+ */
42
+ public static function ms_wp_authenticate_user ($user_or_wp_error = FALSE)
43
+ {
44
+ if(!is_multisite()) return $user_or_wp_error;
45
+
46
+ foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
47
+ do_action ("ws_plugin__s2member_before_ms_wp_authenticate_user", get_defined_vars ());
48
+ unset /* Unset defined __refs, __v. */ ($__refs, $__v);
49
+
50
+ if(is_a($user_or_wp_error, "WP_User") && ($user = $user_or_wp_error) && $user->ID && !is_super_admin($user->ID) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user->ID)), TRUE))
51
+ $user_or_wp_error = new WP_Error("invalid_username", _x("<strong>ERROR</strong>: Invalid username for this site.", "s2member-front", "s2member"));
52
+
53
+ return apply_filters ("ws_plugin__s2member_ms_wp_authenticate_user", $user_or_wp_error, get_defined_vars ());
54
+ }
55
  /**
56
  * Handles login redirections.
57
  *
includes/classes/users-list-in.inc.php CHANGED
@@ -176,6 +176,22 @@ if(!class_exists("c_ws_plugin__s2member_users_list_in"))
176
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
177
  do_action("ws_plugin__s2member_during_users_list_edit_cols_after_auto_eot_time", get_defined_vars());
178
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  }
180
 
181
  if(c_ws_plugin__s2member_list_servers::list_servers_integrated()) // Only if integrated with s2Member.
@@ -484,6 +500,9 @@ if(!class_exists("c_ws_plugin__s2member_users_list_in"))
484
 
485
  if /* Delete/reset IP Restrictions? */(!empty($_p["ws_plugin__s2member_profile_ip_restrictions"]))
486
  c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions(strtolower($user->user_login));
 
 
 
487
 
488
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
489
  do_action("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars());
176
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
177
  do_action("ws_plugin__s2member_during_users_list_edit_cols_after_auto_eot_time", get_defined_vars());
178
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
179
+
180
+ if(c_ws_plugin__s2member_utils_conds::pro_is_installed())
181
+ {
182
+ foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
183
+ do_action("ws_plugin__s2member_during_users_list_edit_cols_before_reset_pass_resend", get_defined_vars());
184
+ unset /* Unset defined __refs, __v. */ ($__refs, $__v);
185
+
186
+ echo '<tr>'."\n";
187
+ echo '<th><label for="ws-plugin--s2member-profile-reset-pass-resend">Reset Password &amp; Resend Welcome Email Message:</label> <a href="#" onclick="alert(\'Checking this box will tell s2Member® to reset this User\\\'s password and then reprocess the New User Email Notification message against this User\\\'s account. This way they\\\'ll get an email message with their Username/Password.\\n\\nThis can be helpful in cases where a User/Member missed the original email message for some reason.\\n\\nThe User\\\'s password is reset to a new auto-generated password by default. However, you can provide a custom password by entering a new password of your choosing in the field above — provided by WordPress® itself.\\n\\nIt is also possible to customize the New User Email Notification message with s2Member®. Please see: `Dashboard -› s2Member® -› General Options -› Email Configuration -› New User Notifications`.\'); return false;" tabindex="-1">[?]</a></th>'."\n";
188
+ echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_reset_pass_resend" id="ws-plugin--s2member-profile-reset-pass-resend" value="1" /> Yes, reset password &amp; resend welcome email message to this User.</label></td>'."\n";
189
+ echo '</tr>'."\n";
190
+
191
+ foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
192
+ do_action("ws_plugin__s2member_during_users_list_edit_cols_after_reset_pass_resend", get_defined_vars());
193
+ unset /* Unset defined __refs, __v. */ ($__refs, $__v);
194
+ }
195
  }
196
 
197
  if(c_ws_plugin__s2member_list_servers::list_servers_integrated()) // Only if integrated with s2Member.
500
 
501
  if /* Delete/reset IP Restrictions? */(!empty($_p["ws_plugin__s2member_profile_ip_restrictions"]))
502
  c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions(strtolower($user->user_login));
503
+
504
+ if /* Reset password & resend email notification? */ (!empty($_p["ws_plugin__s2member_profile_reset_pass_resend"]) && c_ws_plugin__s2member_utils_conds::pro_is_installed())
505
+ c_ws_plugin__s2member_email_configs::reset_pass_resend_new_user_notification($user_id, ((!empty($_p["pass1"])) ? $_p["pass1"] : ""));
506
 
507
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
508
  do_action("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars());
includes/hooks.inc.php CHANGED
@@ -67,6 +67,7 @@ add_action("wp_print_scripts", "c_ws_plugin__s2member_css_js_themes::add_js_w_gl
67
 
68
  add_action("wp_login_failed", "c_ws_plugin__s2member_brute_force::track_failed_logins");
69
  add_filter("authenticate", "c_ws_plugin__s2member_brute_force::stop_brute_force_logins", 100);
 
70
 
71
  add_action("delete_user", "c_ws_plugin__s2member_user_deletions::handle_user_deletions");
72
  add_action("wpmu_delete_user", "c_ws_plugin__s2member_user_deletions::handle_ms_user_deletions");
67
 
68
  add_action("wp_login_failed", "c_ws_plugin__s2member_brute_force::track_failed_logins");
69
  add_filter("authenticate", "c_ws_plugin__s2member_brute_force::stop_brute_force_logins", 100);
70
+ add_filter("wp_authenticate_user", "c_ws_plugin__s2member_login_redirects::ms_wp_authenticate_user", 100);
71
 
72
  add_action("delete_user", "c_ws_plugin__s2member_user_deletions::handle_user_deletions");
73
  add_action("wpmu_delete_user", "c_ws_plugin__s2member_user_deletions::handle_ms_user_deletions");
includes/menu-pages/logs.inc.php CHANGED
@@ -295,7 +295,7 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_logs"))
295
  echo '<p style="float:right; text-align:right;">[ <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce ("ws-plugin--s2member-download-log-file-v")))).'"><strong>download file</strong></a> ]</p>'."\n";
296
  echo '<p style="margin-right:10px; float:right; text-align:right;"><a href="#" class="ws-plugin--s2member-log-file-viewport-toggle" style="text-decoration:none;">&#8659; expand viewport &#8659;</a></p>'."\n";
297
 
298
- echo '<textarea id="ws-plugin--s2member-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 8px #000000; background:#EEEEEE; color:#000000; overflow-y:scroll; font-family:\'Consolas\', \'Monaco\', monospace;">'.esc_html(file_get_contents($logs_dir."/".$view_log_file)).'</textarea>' . "\n";
299
 
300
  echo '<p style="float:left; text-align:left;"><strong>Viewing:</strong> <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce ("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).'</a> (log entries oldest to newest)</p>'."\n";
301
  echo '<p style="float:right; text-align:right;">[ <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce ("ws-plugin--s2member-download-log-file-v")))).'"><strong>download file</strong></a> ]</p>'."\n";
295
  echo '<p style="float:right; text-align:right;">[ <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce ("ws-plugin--s2member-download-log-file-v")))).'"><strong>download file</strong></a> ]</p>'."\n";
296
  echo '<p style="margin-right:10px; float:right; text-align:right;"><a href="#" class="ws-plugin--s2member-log-file-viewport-toggle" style="text-decoration:none;">&#8659; expand viewport &#8659;</a></p>'."\n";
297
 
298
+ echo '<textarea id="ws-plugin--s2member-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 8px #000000; background:#EEEEEE; color:#000000; overflow-y:scroll; font-family:\'Consolas\', \'Monaco\', monospace;">'.htmlspecialchars(file_get_contents($logs_dir."/".$view_log_file)).'</textarea>' . "\n";
299
 
300
  echo '<p style="float:left; text-align:left;"><strong>Viewing:</strong> <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce ("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).'</a> (log entries oldest to newest)</p>'."\n";
301
  echo '<p style="float:right; text-align:right;">[ <a href="'.esc_attr(add_query_arg(array("ws_plugin__s2member_download_log_file" => $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce ("ws-plugin--s2member-download-log-file-v")))).'"><strong>download file</strong></a> ]</p>'."\n";
includes/translations/s2member.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the s2Member® Framework package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: s2Member® Framework 130404\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
- "POT-Creation-Date: 2013-04-04 23:53:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -499,6 +499,11 @@ msgctxt "s2member-front"
499
  msgid "<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance."
500
  msgstr ""
501
 
 
 
 
 
 
502
  #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
503
  #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:156
504
  #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
@@ -874,12 +879,12 @@ msgid_plural "You may create up to <strong>%s</strong> sites."
874
  msgstr[0] ""
875
  msgstr[1] ""
876
 
877
- #: s2member/includes/classes/users-list-in.inc.php:313
878
  msgctxt "s2member-front"
879
  msgid "Additional Profile Fields"
880
  msgstr ""
881
 
882
- #: s2member/includes/classes/users-list-in.inc.php:313
883
  msgctxt "s2member-front"
884
  msgid "(for this site)"
885
  msgstr ""
2
  # This file is distributed under the same license as the s2Member® Framework package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: s2Member® Framework 130406\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
+ "POT-Creation-Date: 2013-04-07 00:38:06+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
499
  msgid "<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance."
500
  msgstr ""
501
 
502
+ #: s2member/includes/classes/login-redirects.inc.php:51
503
+ msgctxt "s2member-front"
504
+ msgid "<strong>ERROR</strong>: Invalid username for this site."
505
+ msgstr ""
506
+
507
  #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
508
  #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:156
509
  #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
879
  msgstr[0] ""
880
  msgstr[1] ""
881
 
882
+ #: s2member/includes/classes/users-list-in.inc.php:329
883
  msgctxt "s2member-front"
884
  msgid "Additional Profile Fields"
885
  msgstr ""
886
 
887
+ #: s2member/includes/classes/users-list-in.inc.php:329
888
  msgctxt "s2member-front"
889
  msgid "(for this site)"
890
  msgstr ""
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
- Version: 130404
4
- Stable tag: 130404
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
@@ -92,11 +92,17 @@ Please see [this FAQ entry](http://www.s2member.com/faqs/#s2-faqs-translations)
92
 
93
  == Upgrade Notice ==
94
 
95
- = v130404 =
96
  (Maintenance Release) Upgrade immediately.
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
 
100
  = v130404 =
101
  * (s2Member Pro) **Compatibility (WebSharks/Private#108)** Updating s2Member® Pro's integration with Authorize.Net to allow charges up to `$99,999.00` (formerly `$10,000.00`).
102
  * (s2Member/s2Member Pro) **User Searches (WebSharks/Private#91)** Updating `pre_user_query` filter to include `first_name/last_name` (instead of only the `display_name`).
1
  === s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
+ Version: 130406
4
+ Stable tag: 130406
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
92
 
93
  == Upgrade Notice ==
94
 
95
+ = v130406 =
96
  (Maintenance Release) Upgrade immediately.
97
 
98
  == Changelog ==
99
 
100
+ = v130406 =
101
+ * (s2Member/s2Member Pro) **Multisite Networks (WebSharks/Private#145)** Bug fix on Multisite Networks related to User deletions and subsequent logins on child blogs. For further details, please see [this thread](http://www.s2member.com/forums/topic/deleted-users-can-log-in/#post-46738).
102
+ * (s2Member Pro) **New Feature (WebSharks/Private#59)** It is now possible to Edit a User in the Dashboard and check a box to have the User's password reset, and an email message sent automatically to the User/Member with a copy of the Username/Password. This requires s2Member® Pro.
103
+ * (s2Member Pro) **API Functions (WebSharks/Private#158)** New PayPal® Pro API Functions (`s2member_pro_paypal_rbp_for_user`, `s2member_pro_paypal_rbp_times_for_user`). These are for developers. For further details, please see [this article](http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/) in the s2Member® Codex.
104
+ * (s2Member Pro) **API Functions (WebSharks/Private#158)** New PayPal® Pro (PayFlow® Edition) API Functions (`s2member_pro_payflow_rbp_for_user`, `s2member_pro_payflow_rbp_times_for_user`). These are for developers. For further details, please see [this article](http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/) in the s2Member® Codex.
105
+
106
  = v130404 =
107
  * (s2Member Pro) **Compatibility (WebSharks/Private#108)** Updating s2Member® Pro's integration with Authorize.Net to allow charges up to `$99,999.00` (formerly `$10,000.00`).
108
  * (s2Member/s2Member Pro) **User Searches (WebSharks/Private#91)** Updating `pre_user_query` filter to include `first_name/last_name` (instead of only the `display_name`).
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 130404
23
- Stable tag: 130404
24
 
25
  SSL Compatible: yes
26
  bbPress® Compatible: yes
@@ -75,7 +75,7 @@ if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
75
  * @var str
76
  */
77
  if(!defined("WS_PLUGIN__S2MEMBER_VERSION"))
78
- define("WS_PLUGIN__S2MEMBER_VERSION", "130404" /* !#distro-version#! */);
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
@@ -105,7 +105,7 @@ if(!defined("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION"))
105
  * @var str
106
  */
107
  if(!defined("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
- define("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "130404" /* !#distro-version#! */);
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 130406
23
+ Stable tag: 130406
24
 
25
  SSL Compatible: yes
26
  bbPress® Compatible: yes
75
  * @var str
76
  */
77
  if(!defined("WS_PLUGIN__S2MEMBER_VERSION"))
78
+ define("WS_PLUGIN__S2MEMBER_VERSION", "130406" /* !#distro-version#! */);
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
105
  * @var str
106
  */
107
  if(!defined("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
+ define("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "130406" /* !#distro-version#! */);
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.