Cimy User Extra Fields - Version 2.3.2

Version Description

Download this release

Release Info

Developer Cimmo
Plugin Icon wp plugin Cimy User Extra Fields
Version 2.3.2
Comparing to
See all releases

Code changes from version 2.3.1 to 2.3.2

README_OFFICIAL.txt CHANGED
@@ -573,6 +573,19 @@ A: Unluckily due to a WordPress limitation I can’t add Extra Fields into user-
573
  Cimy User Manager – http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-manager/
574
 
575
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
  Q: When feature XYZ will be added?
577
 
578
  A: I don't know, remember that this is a 100% free project so answer is "When I have time and/or when someone help me with a donation".
@@ -606,6 +619,10 @@ A lot of times I cannot reproduce the problem and I need more details, so if you
606
 
607
 
608
  CHANGELOG:
 
 
 
 
609
  v2.3.1 - 06/12/2011
610
  - Fixed profiles cannot be updated anymore when captcha is selected (introduced with v2.3.0) (thanks to Miguel Morera and Takanudo)
611
  - Fixed captcha error messages are not displayed under WordPress MS
573
  Cimy User Manager – http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-manager/
574
 
575
 
576
+ Q: I cannot edit neither delete some Extra Fields, usually after the 10th one, why?
577
+
578
+ A: Your PHP server is probably limiting number of $_POST elements, Suhosin for example does it. Please allow at least 500 or more vars.
579
+ http://www.hardened-php.net/suhosin/configuration.html#suhosin.post.max_vars
580
+
581
+
582
+ Q: I am trying to change the fields' order, but whatever I try it doesn't work, why?
583
+
584
+ A: First of all you need to select at least 2 fields if you want to change the order.
585
+ Secondly if you change for example field n.1 to position n.3 be sure that field n.3 goes into another position and finally that a field goes into position n.1
586
+ In short: every field should have a new position or at least the same one, but no positions can be skipped or be present multiple times.
587
+
588
+
589
  Q: When feature XYZ will be added?
590
 
591
  A: I don't know, remember that this is a 100% free project so answer is "When I have time and/or when someone help me with a donation".
619
 
620
 
621
  CHANGELOG:
622
+ v2.3.2 - 14/12/2011
623
+ - Fixed image upload was no more possible in some cases under WordPress MS (introduced with v2.3.0) (thanks to Alexander Temper)
624
+ - Fixed a rare case of site crash under WordPress MS registration (thanks to Dan)
625
+
626
  v2.3.1 - 06/12/2011
627
  - Fixed profiles cannot be updated anymore when captcha is selected (introduced with v2.3.0) (thanks to Miguel Morera and Takanudo)
628
  - Fixed captcha error messages are not displayed under WordPress MS
cimy_uef_admin.php CHANGED
@@ -36,7 +36,7 @@ function cimy_admin_define_extra_fields() {
36
  $maxLen = $max_length_value;
37
 
38
  $submit = "";
39
-
40
  $action = "";
41
  // defaults to add
42
  $field_order = "0";
@@ -162,7 +162,7 @@ function cimy_admin_define_extra_fields() {
162
 
163
  // check which fields are selected for deletions
164
  for ($i = 1; $i <= $tot_fields; $i++)
165
- if ($_POST['check'][$i]) {
166
  if ($k > (-1)) {
167
  $sql.= " OR ";
168
  $sql_data_del.= " OR ";
@@ -1129,7 +1129,6 @@ function cimy_admin_users_list_page() {
1129
  if (is_network_admin()) {
1130
  require_once(ABSPATH . 'wp-admin/includes/class-wp-ms-users-list-table.php');
1131
  class WP_Cimy_Users_List_Table extends WP_MS_Users_List_Table {
1132
- var $old_args = array();
1133
  function prepare_items() {
1134
  global $role, $usersearch, $wpdb;
1135
 
@@ -1232,7 +1231,6 @@ function cimy_admin_users_list_page() {
1232
  else {
1233
  require_once(ABSPATH . 'wp-admin/includes/class-wp-users-list-table.php');
1234
  class WP_Cimy_Users_List_Table extends WP_Users_List_Table {
1235
- var $old_args = array();
1236
  function prepare_items() {
1237
  global $role, $usersearch;
1238
 
36
  $maxLen = $max_length_value;
37
 
38
  $submit = "";
39
+ $fieldset = 0;
40
  $action = "";
41
  // defaults to add
42
  $field_order = "0";
162
 
163
  // check which fields are selected for deletions
164
  for ($i = 1; $i <= $tot_fields; $i++)
165
+ if (!empty($_POST['check'][$i])) {
166
  if ($k > (-1)) {
167
  $sql.= " OR ";
168
  $sql_data_del.= " OR ";
1129
  if (is_network_admin()) {
1130
  require_once(ABSPATH . 'wp-admin/includes/class-wp-ms-users-list-table.php');
1131
  class WP_Cimy_Users_List_Table extends WP_MS_Users_List_Table {
 
1132
  function prepare_items() {
1133
  global $role, $usersearch, $wpdb;
1134
 
1231
  else {
1232
  require_once(ABSPATH . 'wp-admin/includes/class-wp-users-list-table.php');
1233
  class WP_Cimy_Users_List_Table extends WP_Users_List_Table {
 
1234
  function prepare_items() {
1235
  global $role, $usersearch;
1236
 
cimy_uef_db.php CHANGED
@@ -343,6 +343,7 @@ function cimy_manage_db($command) {
343
  'welcome_email' => $welcome_email,
344
  'confirm_form' => false,
345
  'confirm_email' => false,
 
346
  'redirect_to' => '',
347
  'file_fields' => array(
348
  'show_in_reg' => 0,
343
  'welcome_email' => $welcome_email,
344
  'confirm_form' => false,
345
  'confirm_email' => false,
346
+ 'password_meter' => false,
347
  'redirect_to' => '',
348
  'file_fields' => array(
349
  'show_in_reg' => 0,
cimy_uef_profile.php CHANGED
@@ -73,10 +73,7 @@ function cimy_extract_ExtraFields() {
73
  $description = cimy_uef_sanitize_content($thisField['DESCRIPTION']);
74
  $fieldset = $thisField['FIELDSET'];
75
  $unique_id = $fields_name_prefix.$field_id;
76
- if ($type == "textarea-rich")
77
- $input_name = $unique_id;
78
- else
79
- $input_name = $fields_name_prefix.esc_attr($name);
80
  $field_id_data = $input_name."_".$field_id."_data";
81
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
82
 
@@ -481,6 +478,7 @@ function cimy_extract_ExtraFields() {
481
  if ($type == "textarea-rich" && function_exists("wp_editor")) {
482
  $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
483
  $editor_settings = array(
 
484
  'teeny' => false,
485
  'textarea_rows' => '10',
486
  'dfw' => false,
@@ -554,10 +552,7 @@ function cimy_update_ExtraFields() {
554
  $label = $thisField["LABEL"];
555
  $rules = $thisField["RULES"];
556
  $unique_id = $fields_name_prefix.$field_id;
557
- if ($type == "textarea-rich")
558
- $input_name = $unique_id;
559
- else
560
- $input_name = $fields_name_prefix.esc_attr($name);
561
  $field_id_data = $input_name."_".$field_id."_data";
562
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
563
 
73
  $description = cimy_uef_sanitize_content($thisField['DESCRIPTION']);
74
  $fieldset = $thisField['FIELDSET'];
75
  $unique_id = $fields_name_prefix.$field_id;
76
+ $input_name = $fields_name_prefix.esc_attr($name);
 
 
 
77
  $field_id_data = $input_name."_".$field_id."_data";
78
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
79
 
478
  if ($type == "textarea-rich" && function_exists("wp_editor")) {
479
  $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
480
  $editor_settings = array(
481
+ 'textarea_name' => $input_name,
482
  'teeny' => false,
483
  'textarea_rows' => '10',
484
  'dfw' => false,
552
  $label = $thisField["LABEL"];
553
  $rules = $thisField["RULES"];
554
  $unique_id = $fields_name_prefix.$field_id;
555
+ $input_name = $fields_name_prefix.esc_attr($name);
 
 
 
556
  $field_id_data = $input_name."_".$field_id."_data";
557
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
558
 
cimy_uef_register.php CHANGED
@@ -130,10 +130,7 @@ function cimy_register_user_extra_fields($user_id, $password="", $meta=array())
130
  $label = $thisField["LABEL"];
131
  $rules = $thisField["RULES"];
132
  $unique_id = $prefix.$field_id;
133
- if ($type == "textarea-rich")
134
- $input_name = $unique_id;
135
- else
136
- $input_name = $prefix.esc_attr($name);
137
  $field_id_data = $input_name."_".$field_id."_data";
138
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
139
 
@@ -347,10 +344,7 @@ function cimy_registration_check($user_login, $user_email, $errors) {
347
  $label = esc_html($thisField['LABEL']);
348
  $description = $thisField['DESCRIPTION'];
349
  $unique_id = $prefix.$field_id;
350
- if ($type == "textarea-rich")
351
- $input_name = $unique_id;
352
- else
353
- $input_name = $prefix.esc_attr($name);
354
  $field_id_data = $input_name."_".$field_id."_data";
355
 
356
  // if the current user LOGGED IN has not enough permissions to see the field, skip it
@@ -694,10 +688,7 @@ function cimy_registration_form($errors=null, $show_type=0) {
694
  $fieldset = empty($thisField['FIELDSET']) ? 0 : $thisField['FIELDSET'];
695
  $maxlen = 0;
696
  $unique_id = $prefix.$field_id;
697
- if ($type == "textarea-rich")
698
- $input_name = $unique_id;
699
- else
700
- $input_name = $prefix.esc_attr($name);
701
  $field_id_data = $input_name."_".$field_id."_data";
702
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
703
 
@@ -1051,7 +1042,7 @@ function cimy_registration_form($errors=null, $show_type=0) {
1051
  if (($type != "radio") && ($type != "checkbox"))
1052
  echo $obj_label;
1053
 
1054
- if (is_multisite()) {
1055
  if ( $errmsg = $errors->get_error_message($unique_id) ) {
1056
  echo '<p class="error">'.$errmsg.'</p>';
1057
  }
@@ -1067,6 +1058,7 @@ function cimy_registration_form($errors=null, $show_type=0) {
1067
  <?php
1068
  $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
1069
  $editor_settings = array(
 
1070
  'teeny' => false,
1071
  'textarea_rows' => '10',
1072
  'dfw' => false,
@@ -1117,7 +1109,7 @@ function cimy_registration_form($errors=null, $show_type=0) {
1117
  global $cuef_securimage_webpath;
1118
  if (is_multisite()) {
1119
  $width = 500;
1120
- if ($errmsg = $errors->get_error_message("securimage_code"))
1121
  echo '<p class="error">'.$errmsg.'</p>';
1122
  }
1123
  else
@@ -1137,7 +1129,7 @@ function cimy_registration_form($errors=null, $show_type=0) {
1137
 
1138
  if (($show_type != 2) && ($options['captcha'] == "recaptcha") && (!empty($options['recaptcha_public_key'])) && (!empty($options['recaptcha_private_key']))) {
1139
  require_once($cuef_plugin_dir.'/recaptcha/recaptchalib.php');
1140
- if (is_multisite() && $errmsg = $errors->get_error_message("recaptcha_code")) {
1141
  echo '<p class="error">'.$errmsg.'</p>';
1142
  }
1143
  ?>
130
  $label = $thisField["LABEL"];
131
  $rules = $thisField["RULES"];
132
  $unique_id = $prefix.$field_id;
133
+ $input_name = $prefix.esc_attr($name);
 
 
 
134
  $field_id_data = $input_name."_".$field_id."_data";
135
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
136
 
344
  $label = esc_html($thisField['LABEL']);
345
  $description = $thisField['DESCRIPTION'];
346
  $unique_id = $prefix.$field_id;
347
+ $input_name = $prefix.esc_attr($name);
 
 
 
348
  $field_id_data = $input_name."_".$field_id."_data";
349
 
350
  // if the current user LOGGED IN has not enough permissions to see the field, skip it
688
  $fieldset = empty($thisField['FIELDSET']) ? 0 : $thisField['FIELDSET'];
689
  $maxlen = 0;
690
  $unique_id = $prefix.$field_id;
691
+ $input_name = $prefix.esc_attr($name);
 
 
 
692
  $field_id_data = $input_name."_".$field_id."_data";
693
  $advanced_options = cimy_uef_parse_advanced_options($rules["advanced_options"]);
694
 
1042
  if (($type != "radio") && ($type != "checkbox"))
1043
  echo $obj_label;
1044
 
1045
+ if (is_multisite() && is_wp_error($errors)) {
1046
  if ( $errmsg = $errors->get_error_message($unique_id) ) {
1047
  echo '<p class="error">'.$errmsg.'</p>';
1048
  }
1058
  <?php
1059
  $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
1060
  $editor_settings = array(
1061
+ 'textarea_name' => $input_name,
1062
  'teeny' => false,
1063
  'textarea_rows' => '10',
1064
  'dfw' => false,
1109
  global $cuef_securimage_webpath;
1110
  if (is_multisite()) {
1111
  $width = 500;
1112
+ if (is_wp_error($errors) && $errmsg = $errors->get_error_message("securimage_code"))
1113
  echo '<p class="error">'.$errmsg.'</p>';
1114
  }
1115
  else
1129
 
1130
  if (($show_type != 2) && ($options['captcha'] == "recaptcha") && (!empty($options['recaptcha_public_key'])) && (!empty($options['recaptcha_private_key']))) {
1131
  require_once($cuef_plugin_dir.'/recaptcha/recaptchalib.php');
1132
+ if (is_multisite() && is_wp_error($errors) && $errmsg = $errors->get_error_message("recaptcha_code")) {
1133
  echo '<p class="error">'.$errmsg.'</p>';
1134
  }
1135
  ?>
cimy_user_extra_fields.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cimy User Extra Fields
4
  Plugin URI: http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/
5
  Description: Add some useful fields to registration and user's info
6
- Version: 2.3.1
7
  Author: Marco Cimmino
8
  Author URI: mailto:cimmino.marco@gmail.com
9
  License: GPL2
@@ -175,7 +175,7 @@ require_once($cuef_plugin_dir.'/cimy_uef_options.php');
175
  require_once($cuef_plugin_dir.'/cimy_uef_admin.php');
176
 
177
  $cimy_uef_name = "Cimy User Extra Fields";
178
- $cimy_uef_version = "2.3.1";
179
  $cimy_uef_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/";
180
  $cimy_project_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/support-the-cimy-project-paypal/";
181
 
@@ -577,6 +577,10 @@ function cimy_change_signup_location($url) {
577
  return "http://" . $current_site->domain . $current_site->path . "wp-signup.php".$attribute;
578
  }
579
 
 
 
 
 
580
  // add filter for random generated password
581
  add_filter('random_password', 'cimy_register_overwrite_password');
582
 
@@ -832,9 +836,6 @@ function cimy_admin_menu_custom() {
832
  add_action('admin_print_scripts-'.$aue_page, 'cimy_uef_admin_ajax_edit');
833
  if (!empty($admin))
834
  add_action('admin_print_scripts-'.$admin, 'cimy_uef_admin_init_js');
835
-
836
- add_action('admin_print_scripts-user-edit.php', 'cimy_uef_admin_profile_init_js');
837
- add_action('admin_print_scripts-profile.php', 'cimy_uef_admin_profile_init_js');
838
  }
839
 
840
  function cimy_manage_upload($input_name, $user_login, $rules, $old_file=false, $delete_file=false, $type="", $new_filename="") {
3
  Plugin Name: Cimy User Extra Fields
4
  Plugin URI: http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/
5
  Description: Add some useful fields to registration and user's info
6
+ Version: 2.3.2
7
  Author: Marco Cimmino
8
  Author URI: mailto:cimmino.marco@gmail.com
9
  License: GPL2
175
  require_once($cuef_plugin_dir.'/cimy_uef_admin.php');
176
 
177
  $cimy_uef_name = "Cimy User Extra Fields";
178
+ $cimy_uef_version = "2.3.2";
179
  $cimy_uef_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/";
180
  $cimy_project_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/support-the-cimy-project-paypal/";
181
 
577
  return "http://" . $current_site->domain . $current_site->path . "wp-signup.php".$attribute;
578
  }
579
 
580
+ // add javascripts to profile edit
581
+ add_action('admin_print_scripts-user-edit.php', 'cimy_uef_admin_profile_init_js');
582
+ add_action('admin_print_scripts-profile.php', 'cimy_uef_admin_profile_init_js');
583
+
584
  // add filter for random generated password
585
  add_filter('random_password', 'cimy_register_overwrite_password');
586
 
836
  add_action('admin_print_scripts-'.$aue_page, 'cimy_uef_admin_ajax_edit');
837
  if (!empty($admin))
838
  add_action('admin_print_scripts-'.$admin, 'cimy_uef_admin_init_js');
 
 
 
839
  }
840
 
841
  function cimy_manage_upload($input_name, $user_login, $rules, $old_file=false, $delete_file=false, $type="", $new_filename="") {
readme.txt CHANGED
@@ -5,7 +5,7 @@ Website link: http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra
5
  Tags: cimy, admin, registration, profile, extra fields, avatar, gravatar, recaptcha, captcha
6
  Requires at least: 3.1
7
  Tested up to: 3.3
8
- Stable tag: 2.3.1
9
 
10
  Add some useful fields to registration and user's info
11
 
5
  Tags: cimy, admin, registration, profile, extra fields, avatar, gravatar, recaptcha, captcha
6
  Requires at least: 3.1
7
  Tested up to: 3.3
8
+ Stable tag: 2.3.2
9
 
10
  Add some useful fields to registration and user's info
11