Cimy User Extra Fields - Version 2.3.4

Version Description

Download this release

Release Info

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

Code changes from version 2.3.3 to 2.3.4

README_OFFICIAL.txt CHANGED
@@ -619,6 +619,11 @@ A lot of times I cannot reproduce the problem and I need more details, so if you
619
 
620
 
621
  CHANGELOG:
 
 
 
 
 
622
  v2.3.3 - 29/12/2011
623
  - Fixed image/file/avatar upload when Theme My Login is in use (introduced with v2.3.0) (thanks to Brandon Krakowsky)
624
  - Fixed password meter and textarea-rich were not working after submitting a registration with some errors when form confirmation is turned on (introduced with v2.3.0)
619
 
620
 
621
  CHANGELOG:
622
+ v2.3.4 - 02/01/2012
623
+ - Fixed profiles cannot be updated anymore when there are some rules set (introduced with v2.3.3) (thanks to Csaba)
624
+ - Fixed PHP warnings
625
+ - Code cleanup
626
+
627
  v2.3.3 - 29/12/2011
628
  - Fixed image/file/avatar upload when Theme My Login is in use (introduced with v2.3.0) (thanks to Brandon Krakowsky)
629
  - Fixed password meter and textarea-rich were not working after submitting a registration with some errors when form confirmation is turned on (introduced with v2.3.0)
cimy_uef_admin.php CHANGED
@@ -445,8 +445,6 @@ function cimy_admin_define_extra_fields() {
445
  if (empty($type))
446
  $type = "text";
447
 
448
- (empty($label)) ? $selected_input["label"] = '' : $selected_input["label"] = $label;
449
- (empty($value)) ? $selected_input["value"] = '' : $selected_input["value"] = $value;
450
  $selected_input["name"] = '';
451
  $selected_input["desc"] = '';
452
  $selected_input["min_length"] = '';
@@ -463,6 +461,12 @@ function cimy_admin_define_extra_fields() {
463
  if (!empty($name))
464
  $selected_input["name"] = $name;
465
 
 
 
 
 
 
 
466
  // DESCRIPTION
467
  if (!empty($desc))
468
  $selected_input["desc"] = $desc;
@@ -524,9 +528,9 @@ function cimy_admin_define_extra_fields() {
524
  $selected_input["show_in_aeu"] = '';
525
 
526
  $selected_input["name"] = esc_attr($selected_input["name"]);
527
- $selected_input["value"] = esc_attr($selected_input["value"]);
528
- $selected_input["label"] = esc_attr($selected_input["label"]);
529
- $selected_input["desc"] = esc_attr($selected_input["desc"]);
530
  $selected_input["equal_to"] = esc_attr($selected_input["equal_to"]);
531
  ?>
532
 
@@ -778,9 +782,9 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields, $err
778
  $id = $field['ID'];
779
  $order = $field['F_ORDER'];
780
  $name = esc_attr($field['NAME']);
781
- $value = esc_attr($field['VALUE']);
782
- $desc = esc_attr($field['DESCRIPTION']);
783
- $label = esc_attr($field['LABEL']);
784
  $type = $field['TYPE'];
785
  $rules = $field['RULES'];
786
  if (!$wp_fields) {
@@ -1817,7 +1821,6 @@ function cimy_save_field($action, $table, $data) {
1817
 
1818
  $type = $wpdb->escape($data['type']);
1819
  $store_rule = $wpdb->escape(serialize($data['store_rule']));
1820
- $field_order = $wpdb->escape($data['field_order']);
1821
  $num_fields = $wpdb->escape($data['num_fields']);
1822
 
1823
  if ($action == "add")
@@ -1829,8 +1832,10 @@ function cimy_save_field($action, $table, $data) {
1829
 
1830
  if ($action == "add")
1831
  $sql.= ", F_ORDER=".($num_fields + 1);
1832
- else if ($action == "edit")
 
1833
  $sql.= " WHERE F_ORDER=".$field_order;
 
1834
 
1835
  $wpdb->query($sql);
1836
  }
445
  if (empty($type))
446
  $type = "text";
447
 
 
 
448
  $selected_input["name"] = '';
449
  $selected_input["desc"] = '';
450
  $selected_input["min_length"] = '';
461
  if (!empty($name))
462
  $selected_input["name"] = $name;
463
 
464
+ // VALUE
465
+ (empty($value)) ? $selected_input["value"] = '' : $selected_input["value"] = $value;
466
+
467
+ // LABEL
468
+ (empty($label)) ? $selected_input["label"] = '' : $selected_input["label"] = $label;
469
+
470
  // DESCRIPTION
471
  if (!empty($desc))
472
  $selected_input["desc"] = $desc;
528
  $selected_input["show_in_aeu"] = '';
529
 
530
  $selected_input["name"] = esc_attr($selected_input["name"]);
531
+ $selected_input["value"] = esc_html($selected_input["value"]);
532
+ $selected_input["label"] = esc_html($selected_input["label"]);
533
+ $selected_input["desc"] = esc_html($selected_input["desc"]);
534
  $selected_input["equal_to"] = esc_attr($selected_input["equal_to"]);
535
  ?>
536
 
782
  $id = $field['ID'];
783
  $order = $field['F_ORDER'];
784
  $name = esc_attr($field['NAME']);
785
+ $value = esc_html($field['VALUE']);
786
+ $desc = esc_html($field['DESCRIPTION']);
787
+ $label = esc_html($field['LABEL']);
788
  $type = $field['TYPE'];
789
  $rules = $field['RULES'];
790
  if (!$wp_fields) {
1821
 
1822
  $type = $wpdb->escape($data['type']);
1823
  $store_rule = $wpdb->escape(serialize($data['store_rule']));
 
1824
  $num_fields = $wpdb->escape($data['num_fields']);
1825
 
1826
  if ($action == "add")
1832
 
1833
  if ($action == "add")
1834
  $sql.= ", F_ORDER=".($num_fields + 1);
1835
+ else if ($action == "edit") {
1836
+ $field_order = $wpdb->escape($data['field_order']);
1837
  $sql.= " WHERE F_ORDER=".$field_order;
1838
+ }
1839
 
1840
  $wpdb->query($sql);
1841
  }
cimy_uef_register.php CHANGED
@@ -319,7 +319,7 @@ function cimy_registration_check($user_login, $user_email, $errors) {
319
  $extra_fields = get_cimyFields(false, true);
320
  $wp_fields = get_cimyFields(true);
321
  $from_profile = false;
322
- if (!empty($_POST["profile"]) && $_POST["from"] == "profile")
323
  $from_profile = true;
324
  // if we are updating profile don't bother with WordPress fields' rules
325
  if ($from_profile)
319
  $extra_fields = get_cimyFields(false, true);
320
  $wp_fields = get_cimyFields(true);
321
  $from_profile = false;
322
+ if (!empty($_POST["from"]) && $_POST["from"] == "profile")
323
  $from_profile = true;
324
  // if we are updating profile don't bother with WordPress fields' rules
325
  if ($from_profile)
cimy_user_extra_fields.php CHANGED
@@ -3,13 +3,13 @@
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.3
7
  Author: Marco Cimmino
8
  Author URI: mailto:cimmino.marco@gmail.com
9
  License: GPL2
10
 
11
  Cimy User Extra Fields - Allows adding mySQL Data fields to store/add more user info
12
- Copyright (c) 2006-2011 Marco Cimmino
13
 
14
  Code for drop-down support is in part from Raymond Elferink raymond@raycom.com
15
  Code for regular expression under equalTo rule is in part from Shane Hartman shane@shanehartman.com
@@ -172,13 +172,13 @@ require_once($cuef_plugin_dir.'/cimy_uef_admin.php');
172
  add_action('admin_init', 'cimy_uef_admin_init');
173
 
174
  $cimy_uef_name = "Cimy User Extra Fields";
175
- $cimy_uef_version = "2.3.3";
176
  $cimy_uef_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/";
177
  $cimy_project_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/support-the-cimy-project-paypal/";
178
 
179
  $start_cimy_uef_comment = "<!--\n";
180
  $start_cimy_uef_comment .= "\tStart code from ".$cimy_uef_name." ".$cimy_uef_version."\n";
181
- $start_cimy_uef_comment .= "\tCopyright (c) 2006-2011 Marco Cimmino\n";
182
  $start_cimy_uef_comment .= "\t".$cimy_uef_url."\n";
183
  $start_cimy_uef_comment .= "-->\n";
184
 
@@ -214,6 +214,7 @@ $wp_hidden_fields = array(
214
  'show_in_search' => false,
215
  'show_in_blog' => false,
216
  'show_level' => -1,
 
217
  ),
218
  ),
219
  'password2' => array(
@@ -234,6 +235,7 @@ $wp_hidden_fields = array(
234
  'show_in_search' => false,
235
  'show_in_blog' => false,
236
  'show_level' => -1,
 
237
  ),
238
  ),
239
  'firstname' => array(
@@ -254,6 +256,7 @@ $wp_hidden_fields = array(
254
  'show_in_search' => false,
255
  'show_in_blog' => false,
256
  'show_level' => -1,
 
257
  ),
258
  ),
259
  'lastname' => array(
@@ -274,6 +277,7 @@ $wp_hidden_fields = array(
274
  'show_in_search' => false,
275
  'show_in_blog' => false,
276
  'show_level' => -1,
 
277
  ),
278
  ),
279
  'nickname' => array(
@@ -294,6 +298,7 @@ $wp_hidden_fields = array(
294
  'show_in_search' => false,
295
  'show_in_blog' => false,
296
  'show_level' => -1,
 
297
  ),
298
  ),
299
  'website' => array(
@@ -314,6 +319,7 @@ $wp_hidden_fields = array(
314
  'show_in_search' => false,
315
  'show_in_blog' => false,
316
  'show_level' => -1,
 
317
  ),
318
  ),
319
  'aim' => array(
@@ -334,6 +340,7 @@ $wp_hidden_fields = array(
334
  'show_in_search' => false,
335
  'show_in_blog' => false,
336
  'show_level' => -1,
 
337
  ),
338
  ),
339
  'yahoo' => array(
@@ -354,6 +361,7 @@ $wp_hidden_fields = array(
354
  'show_in_search' => false,
355
  'show_in_blog' => false,
356
  'show_level' => -1,
 
357
  ),
358
  ),
359
  'jgt' => array(
@@ -374,6 +382,7 @@ $wp_hidden_fields = array(
374
  'show_in_search' => false,
375
  'show_in_blog' => false,
376
  'show_level' => -1,
 
377
  ),
378
  ),
379
  'bio-info' => array(
@@ -394,6 +403,7 @@ $wp_hidden_fields = array(
394
  'show_in_search' => false,
395
  'show_in_blog' => false,
396
  'show_level' => -1,
 
397
  ),
398
  ),
399
  );
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.4
7
  Author: Marco Cimmino
8
  Author URI: mailto:cimmino.marco@gmail.com
9
  License: GPL2
10
 
11
  Cimy User Extra Fields - Allows adding mySQL Data fields to store/add more user info
12
+ Copyright (c) 2006-2012 Marco Cimmino
13
 
14
  Code for drop-down support is in part from Raymond Elferink raymond@raycom.com
15
  Code for regular expression under equalTo rule is in part from Shane Hartman shane@shanehartman.com
172
  add_action('admin_init', 'cimy_uef_admin_init');
173
 
174
  $cimy_uef_name = "Cimy User Extra Fields";
175
+ $cimy_uef_version = "2.3.4";
176
  $cimy_uef_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-user-extra-fields/";
177
  $cimy_project_url = "http://www.marcocimmino.net/cimy-wordpress-plugins/support-the-cimy-project-paypal/";
178
 
179
  $start_cimy_uef_comment = "<!--\n";
180
  $start_cimy_uef_comment .= "\tStart code from ".$cimy_uef_name." ".$cimy_uef_version."\n";
181
+ $start_cimy_uef_comment .= "\tCopyright (c) 2006-2012 Marco Cimmino\n";
182
  $start_cimy_uef_comment .= "\t".$cimy_uef_url."\n";
183
  $start_cimy_uef_comment .= "-->\n";
184
 
214
  'show_in_search' => false,
215
  'show_in_blog' => false,
216
  'show_level' => -1,
217
+ 'advanced_options' => '',
218
  ),
219
  ),
220
  'password2' => array(
235
  'show_in_search' => false,
236
  'show_in_blog' => false,
237
  'show_level' => -1,
238
+ 'advanced_options' => '',
239
  ),
240
  ),
241
  'firstname' => array(
256
  'show_in_search' => false,
257
  'show_in_blog' => false,
258
  'show_level' => -1,
259
+ 'advanced_options' => '',
260
  ),
261
  ),
262
  'lastname' => array(
277
  'show_in_search' => false,
278
  'show_in_blog' => false,
279
  'show_level' => -1,
280
+ 'advanced_options' => '',
281
  ),
282
  ),
283
  'nickname' => array(
298
  'show_in_search' => false,
299
  'show_in_blog' => false,
300
  'show_level' => -1,
301
+ 'advanced_options' => '',
302
  ),
303
  ),
304
  'website' => array(
319
  'show_in_search' => false,
320
  'show_in_blog' => false,
321
  'show_level' => -1,
322
+ 'advanced_options' => '',
323
  ),
324
  ),
325
  'aim' => array(
340
  'show_in_search' => false,
341
  'show_in_blog' => false,
342
  'show_level' => -1,
343
+ 'advanced_options' => '',
344
  ),
345
  ),
346
  'yahoo' => array(
361
  'show_in_search' => false,
362
  'show_in_blog' => false,
363
  'show_level' => -1,
364
+ 'advanced_options' => '',
365
  ),
366
  ),
367
  'jgt' => array(
382
  'show_in_search' => false,
383
  'show_in_blog' => false,
384
  'show_level' => -1,
385
+ 'advanced_options' => '',
386
  ),
387
  ),
388
  'bio-info' => array(
403
  'show_in_search' => false,
404
  'show_in_blog' => false,
405
  'show_level' => -1,
406
+ 'advanced_options' => '',
407
  ),
408
  ),
409
  );
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.3
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.4
9
 
10
  Add some useful fields to registration and user's info
11