Cimy User Extra Fields - Version 2.0.0-beta1

Version Description

Download this release

Release Info

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

Code changes from version 1.5.3 to 2.0.0-beta1

README_OFFICIAL.txt CHANGED
@@ -39,11 +39,11 @@ The plug-in adds two new menu voices in the admin for the administrator and two
39
 
40
  Two new menus are:
41
 
42
- WordPress and WordPress MU per-blog registration:
43
  1. "Users -> A&U Extended" - lets you show users lists with the new fields that are created
44
  2. "Settings -> Cimy User Extra Fields" - lets administrators add as many new fields as are needed to the users' profile, giving the possibility to set some interesting rules.
45
 
46
- Wordpress MU unique registration:
47
  1. "Site Admin -> Users Extended" - lets you show users lists with the new fields that are created
48
  2. "Site Admin -> Cimy User Extra Fields" - lets administrators add as many new fields as are needed to the users' profile, giving the possibility to set some interesting rules.
49
 
@@ -94,28 +94,30 @@ BEFORE writing to me read carefully ALL the documentation AND the FAQ. Missing t
94
  Bugs or suggestions can be mailed at: cimmino.marco@gmail.com
95
 
96
  REQUIREMENTS:
97
- PHP >= 5.0.0
98
- WORDPRESS >= 2.6.x
99
- WORDPRESS MU >= 2.6.x
100
- MYSQL >= 4.0
101
 
102
  INSTALLATION:
103
  - WordPress: just copy whole cimy-user-extra-fields subdir into your plug-in directory and activate it
104
 
105
- - WordPress MU:
106
- There are two supported ways of using this plug-in under WordPress MU:
107
 
108
  1) Unique registration
109
- If you want that ALL Blogs on your MU installation follow the same registration with the same fields this is the case for you.
110
- Every blog will have shared registration page and only the site administrators (of the whole MU installation) can change it.
111
- - unpack the package under 'mu-plugins' directory, be sure that cimy_user_extra_fields.php is outside Cimy folder (move it if necessary), then go to "Site Admin -> Cimy User Extra Fields", press "Fix the problem" button and confirm
 
 
112
 
113
  2) Per-Blog registration
114
  If you want that every single Blog can define its own Extra Fields then you should choose this installation.
115
- Every registration will have Extra Fields defined by single blogs, every user will have anyway WordPress fields shared with ALL Blogs, this how it works
116
- WordPress MU.
117
- - unpack the package under 'plugins' directory; BE sure that cimy_uef_mu_activation.php is installed under 'mu-plugins' directory
118
- - then every single blog will have it under "Plugins" section
119
 
120
 
121
  UPDATE FROM A PREVIOUS VERSION:
@@ -377,7 +379,7 @@ $content: the content to be protected against HTML injections
377
  $override_allowed_tags [array|null, default null]: if you want to override allowed tags you should pass a proper array where all your favourite tags are listed.
378
 
379
  USAGE:
380
- echo cimy_uef_sanitize_content([$content], [$override_allowed_tags]);
381
 
382
  EXAMPLE:
383
  global $allowedtags;
@@ -452,13 +454,9 @@ Create the same directory needed for PICTURE support, avatars will be stored in
452
 
453
  KNOWN ISSUES:
454
  - if you add too many fields in the "A&U Extended" menu they will go out of frame
455
- - some rules are applied only during registration (apart editable and visibility rules and max length for text and password fields only) - this has been fixed using Wordpress >= 2.8.x
456
  - some rules are never applied if you are using PHP 4.x please update to PHP 5.x as stated in the REQUIREMENTS
457
  - registration date cannot be modified
458
- - using WordPress password to let user customize its password works, but has one issue:
459
- - on WordPress email received will contain wrong password (generated by WordPress), this due to WordPress limitation
460
- - on WordPress MU email received and activation page contain correct password, no issues!
461
- - picture and avatar upload is disabled during registration under WordPress MU, will be possible once user is activated
462
  - if you change order or remove fieldsets you may need to set all extra fields' fieldset assigment again
463
  - dropdown issues:
464
  - custom value is not supported
@@ -508,9 +506,9 @@ A: Probably you installed the first time WordPress on PHP4 and you experienced t
508
  To fix the problem you need to create another administrator user and change admin user to another role and then back to administrator.
509
 
510
 
511
- Q: I'm using your plug-in on WordPress MU per-blog installation, I'm registering users on one blog but they appear on the main blog too, why?
512
 
513
- A: Because WordPress MU is designed like that and I can't do anything about, however all extra fields and relative data are saved per-blog.
514
  Since I had already a long discussion with an user that didn't believe this, don't bother me to insist on this topic until you prove I'm wrong.
515
 
516
 
@@ -559,6 +557,26 @@ A lot of times I cannot reproduce the problem and I need more details, so if you
559
 
560
 
561
  CHANGELOG:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
  v1.5.3 - 09/04/2010
563
  - Added set_cimyFieldValue function (thanks to Knark Planta for sponsoring)
564
  - Fixed some PHP warnings
39
 
40
  Two new menus are:
41
 
42
+ WordPress and WordPress MultiSite per-blog registration:
43
  1. "Users -> A&U Extended" - lets you show users lists with the new fields that are created
44
  2. "Settings -> Cimy User Extra Fields" - lets administrators add as many new fields as are needed to the users' profile, giving the possibility to set some interesting rules.
45
 
46
+ Wordpress MultiSite unique registration:
47
  1. "Site Admin -> Users Extended" - lets you show users lists with the new fields that are created
48
  2. "Site Admin -> Cimy User Extra Fields" - lets administrators add as many new fields as are needed to the users' profile, giving the possibility to set some interesting rules.
49
 
94
  Bugs or suggestions can be mailed at: cimmino.marco@gmail.com
95
 
96
  REQUIREMENTS:
97
+ * PHP >= 5.0.0
98
+ * WORDPRESS >= 3.0.x
99
+ * WORDPRESS MultiSite >= 3.0.x
100
+ * MYSQL >= 4.1.2
101
 
102
  INSTALLATION:
103
  - WordPress: just copy whole cimy-user-extra-fields subdir into your plug-in directory and activate it
104
 
105
+ - WordPress MultiSite:
106
+ There are two supported ways of using this plug-in under WordPress MultiSite:
107
 
108
  1) Unique registration
109
+ If you want that ALL Blogs on your MultiSite installation follow the same registration with the same fields this is the case for you.
110
+ Every blog will have shared registration page and only the Super Admin can change it.
111
+ - unpack the package under 'wp-content/mu-plugins' directory (if this directory does not exist, create it);
112
+ - be sure that cimy_user_extra_fields.php is outside Cimy folder (move it if necessary);
113
+ - go to "Site Admin -> Cimy User Extra Fields", press "Fix the problem" button and confirm.
114
 
115
  2) Per-Blog registration
116
  If you want that every single Blog can define its own Extra Fields then you should choose this installation.
117
+ Every registration will have Extra Fields defined by single blogs, every user will have anyway WordPress fields shared with ALL Blogs, this how it works WordPress MultiSite.
118
+ - unpack the package under 'wp-content/plugins' directory;
119
+ - be sure that cimy_uef_mu_activation.php is installed under 'wp-content/mu-plugins' directory (if this directory does not exist, create it);
120
+ - then every single blog will have it under "Plugins" section.
121
 
122
 
123
  UPDATE FROM A PREVIOUS VERSION:
379
  $override_allowed_tags [array|null, default null]: if you want to override allowed tags you should pass a proper array where all your favourite tags are listed.
380
 
381
  USAGE:
382
+ echo cimy_uef_sanitize_content($content, [$override_allowed_tags]);
383
 
384
  EXAMPLE:
385
  global $allowedtags;
454
 
455
  KNOWN ISSUES:
456
  - if you add too many fields in the "A&U Extended" menu they will go out of frame
 
457
  - some rules are never applied if you are using PHP 4.x please update to PHP 5.x as stated in the REQUIREMENTS
458
  - registration date cannot be modified
459
+ - picture and avatar upload is disabled during registration under WordPress MultiSite, will be possible once user is activated
 
 
 
460
  - if you change order or remove fieldsets you may need to set all extra fields' fieldset assigment again
461
  - dropdown issues:
462
  - custom value is not supported
506
  To fix the problem you need to create another administrator user and change admin user to another role and then back to administrator.
507
 
508
 
509
+ Q: I'm using your plug-in on WordPress MultiSite per-blog installation, I'm registering users on one blog but they appear on the main blog too, why?
510
 
511
+ A: Because WordPress MultiSite is designed like that and I can't do anything about, however all extra fields and relative data are saved per-blog.
512
  Since I had already a long discussion with an user that didn't believe this, don't bother me to insist on this topic until you prove I'm wrong.
513
 
514
 
557
 
558
 
559
  CHANGELOG:
560
+ v2.0.0 beta1 - 02/09/2010
561
+ - Added WordPress 3.0.x support
562
+ - Fixed MultiSite recognization
563
+ - Added reCAPTCHA support (thanks to Patrick McCain for sponsoring it)
564
+ - Added password strength meter support (thanks to Patrick McCain for sponsoring it)
565
+ - Added password confirmation support (thanks to Patrick McCain for sponsoring it)
566
+ - Added email confirmation support (non MS only) (thanks to Patrick McCain for sponsoring it)
567
+ - Added extra fields to welcome new user email support (thanks to JeffPBlues Design for sponsoring it)
568
+ - Added custom login/registration logo support (non MS only) (thanks to Patrick McCain for sponsoring it)
569
+ - Fixed some errors were not translated under registration form
570
+ - Fixed rules shouldn't be applied if the user can't edit the field due to permissions (thanks to Paolo Sivori for pointing it)
571
+ - Fixed localization was not working for MultiSite unique registration
572
+ - Fixed extra fields search in the A&U Extended Page using Internet Explorer (thanks to Tom Matteson)
573
+ - Fixed personalized password was not sent in the new user email (non MS only)
574
+ - Fixed default password warning should not appear in case custom password has been entered (non MS only)
575
+ - Fixed directory/file permissions (thanks to Jim)
576
+ - Updated Italian translation
577
+ - Code cleanup
578
+ - Readme file updated
579
+
580
  v1.5.3 - 09/04/2010
581
  - Added set_cimyFieldValue function (thanks to Knark Planta for sponsoring)
582
  - Fixed some PHP warnings
cimy_uef_admin.php CHANGED
@@ -1,10 +1,12 @@
1
  <?php
2
 
3
  function cimy_admin_define_extra_fields() {
4
- global $wpdb, $wpdb_fields_table, $wpdb_wp_fields_table, $rule_canbeempty, $rule_email, $rule_maxlen, $rule_maxlen_needed, $available_types, $max_length_name, $max_length_label, $max_length_desc, $max_length_value, $max_size_file, $rule_equalto, $rule_equalto_case_sensitive, $cimy_uef_domain, $is_mu, $cuef_plugin_path, $cimy_uef_file_types, $rule_equalto_regex;
5
 
6
  if (!cimy_check_admin('manage_options'))
7
  return;
 
 
8
 
9
  $errors = Array();
10
  $results = Array();
@@ -33,30 +35,31 @@ function cimy_admin_define_extra_fields() {
33
  $submit = "";
34
 
35
  $action = "";
36
- $field_order = "";
 
37
 
38
  // options form engine
39
  if (isset($_POST['cimy_options'])) {
40
  $action = "options";
41
  $res = cimy_save_options();
42
  }
43
- else if ((isset($_POST["submit_add"])) && ($_POST["submit_add"] != "")) {
44
  $action = "add";
45
  $submit = $_POST["submit_add"];
46
  }
47
- else if ((isset($_POST["submit_edit"])) && ($_POST["submit_edit"] != "")) {
48
  $action = "edit";
49
  $submit = $_POST["submit_edit"];
50
  }
51
- else if ((isset($_POST["submit_del"])) && ($_POST["submit_del"] != "")) {
52
  $action = "del";
53
  $submit = $_POST["submit_del"];
54
  }
55
- else if ((isset($_POST["submit_del_sel"])) && ($_POST["submit_del_sel"] != "")) {
56
  $action = "delSel";
57
  $submit = $_POST["submit_del_sel"];
58
  }
59
- else if ((isset($_POST["submit_order"])) && ($_POST["submit_order"] != "")) {
60
  $action = "order";
61
  $submit = $_POST["submit_order"];
62
  }
@@ -67,7 +70,7 @@ function cimy_admin_define_extra_fields() {
67
  // call options draw function
68
  $opt_ret = cimy_show_options($res, true);
69
 
70
- // needed fields count here, after options and before $actions manager! do not move!
71
  $num_fields = $opt_ret['db_extra_fields'];
72
  $num_wp_fields = $opt_ret['db_wp_fields'];
73
 
@@ -84,33 +87,29 @@ function cimy_admin_define_extra_fields() {
84
 
85
  // if pushed change order button
86
  if ($action == "order") {
87
-
88
  $sql = "UPDATE ".$fields_table." SET F_ORDER=CASE F_ORDER";
89
-
90
  $k = (-1);
91
  $msg = "";
92
  $msg_new = "";
93
  $arr1 = Array();
94
  $arr2 = Array();
95
 
96
- // check which fields are selected
97
- for ($i = 1; $i <= $tot_fields; $i++)
98
- if ($_POST['check'.$i]) {
99
- if ($k > (-1)) {
100
- $msg.= ", ";
101
- $msg_new.= ", ";
102
- }
103
- else
104
- $k = $i;
105
-
106
- $sql.= " WHEN ".$i." THEN ".$_POST['order'.$i];
107
- $msg.= $i;
108
- $msg_new.= $_POST['order'.$i];
109
-
110
- array_push($arr1, $i);
111
- array_push($arr2, $_POST['order'.$i]);
112
  }
 
 
 
 
 
 
113
 
 
 
 
114
  if ($k > (-1)) {
115
  if (count(array_diff($arr1, $arr2)) == 0) {
116
  $sql.= " ELSE F_ORDER END WHERE F_ORDER IN (".$msg.")";
@@ -129,13 +128,11 @@ function cimy_admin_define_extra_fields() {
129
 
130
  // if pushed delete or update single button
131
  if (($action == "del") || ($action == "edit")) {
132
-
133
- $from = strpos($submit, '#') + 1;
134
- $field_order = substr($submit, $from);
135
 
136
  // if pushed the single delete button then check the relative checkbox and let delSel code to delete it
137
  if ($action == "del") {
138
- $_POST['check'.$field_order] = 1;
139
  $action = "delSel";
140
  }
141
  }
@@ -152,7 +149,7 @@ function cimy_admin_define_extra_fields() {
152
 
153
  // check which fields are selected for deletions
154
  for ($i = 1; $i <= $tot_fields; $i++)
155
- if ($_POST['check'.$i]) {
156
  if ($k > (-1)) {
157
  $sql.= " OR ";
158
  $sql_data_del.= " OR ";
@@ -202,21 +199,21 @@ function cimy_admin_define_extra_fields() {
202
 
203
  if (($action == "add") || ($action == "edit")) {
204
  $store_rule = array();
205
-
206
  // RETRIEVE DATA FROM THE FORM
207
- $name = substr(stripslashes($_POST['name'.$field_order]), 0, $max_length_name);
208
- $value = substr(stripslashes($_POST['value'.$field_order]), 0, $max_length_value);
209
- $desc = substr(stripslashes($_POST['description'.$field_order]), 0, $max_length_desc);
210
- $label = substr(stripslashes($_POST['label'.$field_order]), 0, $max_length_label);
211
 
212
  $name = strtoupper($name);
213
- $oldname = strtoupper(stripslashes($_POST['oldname'.$field_order]));
214
- $type = $_POST['type'.$field_order];
215
- $fieldset = $_POST['fieldset'.$field_order];
216
 
217
- $minlen = $_POST['minlen'.$field_order];
218
- $exactlen = $_POST['exactlen'.$field_order];
219
- $maxlen = $_POST['maxlen'.$field_order];
220
 
221
  // min length available
222
  $minLen = 1;
@@ -237,47 +234,47 @@ function cimy_admin_define_extra_fields() {
237
  /* end overwrite previous values */
238
 
239
  if ($minlen != "")
240
- $store_rule['min_length'] = intval($_POST['minlength'.$field_order]);
241
 
242
  if ($exactlen != "")
243
- $store_rule['exact_length'] = intval($_POST['exactlength'.$field_order]);
244
 
245
  if ($maxlen != "")
246
- $store_rule['max_length'] = intval($_POST['maxlength'.$field_order]);
247
 
248
- $empty = $_POST['empty'.$field_order];
249
  $empty == "1" ? $store_rule['can_be_empty'] = true : $store_rule['can_be_empty'] = false;
250
 
251
  $store_rule['edit'] = $_POST['edit'.$field_order];
252
 
253
- $email = $_POST['email'.$field_order];
254
  $email == "1" ? $store_rule['email'] = true : $store_rule['email'] = false;
255
- $equal = $_POST['equal'.$field_order];
256
 
257
  if ($equal != "") {
258
- $store_rule['equal_to'] = stripslashes($_POST['equalto'.$field_order]);
259
 
260
- $equalto_casesens = $_POST['equalto_casesens'.$field_order];
261
 
262
- $equalto_regex = $_POST['equalto_regex'.$field_order];
263
  }
264
 
265
- $show_in_reg = $_POST['show_in_reg'.$field_order];
266
  $show_in_reg == "1" ? $store_rule['show_in_reg'] = true : $store_rule['show_in_reg'] = false;
267
 
268
- $show_in_profile = $_POST['show_in_profile'.$field_order];
269
  $show_in_profile == "1" ? $store_rule['show_in_profile'] = true : $store_rule['show_in_profile'] = false;
270
 
271
- $show_in_aeu = $_POST['show_in_aeu'.$field_order];
272
  $show_in_aeu == "1" ? $store_rule['show_in_aeu'] = true : $store_rule['show_in_aeu'] = false;
273
 
274
- $show_in_search = $_POST['show_in_search'.$field_order];
275
  $show_in_search == "1" ? $store_rule['show_in_search'] = true : $store_rule['show_in_search'] = false;
276
 
277
- $show_in_blog = $_POST['show_in_blog'.$field_order];
278
  $show_in_blog == "1" ? $store_rule['show_in_blog'] = true : $store_rule['show_in_blog'] = false;
279
 
280
- $show_level = $_POST['show_level'.$field_order];
281
  $store_rule['show_level'] = $show_level;
282
 
283
  // START CHECKING FOR ERRORS
@@ -353,7 +350,7 @@ function cimy_admin_define_extra_fields() {
353
  $errors['value'] = __("With radio type Value can only be", $cimy_uef_domain).": [Yes, No]";
354
  }
355
 
356
- if ($is_mu) {
357
  // uploading files not supported with WordPress MU
358
  if (in_array($type, $cimy_uef_file_types)) {
359
  $store_rule["show_in_reg"] = false;
@@ -641,11 +638,11 @@ function cimy_admin_define_extra_fields() {
641
  else
642
  $selected_input["show_in_blog"] = '';
643
 
644
- $selected_input["name"] = attribute_escape($selected_input["name"]);
645
- $selected_input["value"] = attribute_escape($selected_input["value"]);
646
- $selected_input["label"] = attribute_escape($selected_input["label"]);
647
- $selected_input["desc"] = attribute_escape($selected_input["desc"]);
648
- $selected_input["equal_to"] = attribute_escape($selected_input["equal_to"]);
649
  ?>
650
 
651
  <form method="post" action="#addfield">
@@ -674,12 +671,12 @@ function cimy_admin_define_extra_fields() {
674
  <tbody id="plugins" class="plugins">
675
  <tr class="active">
676
  <td style="vertical-align: middle;">
677
- <label><strong><?php _e("Name"); ?></strong><br /><input name="name" type="text" value="<?php echo $selected_input["name"]; ?>" maxlength="<?php echo $max_length_name; ?>" /></label><br /><br />
678
- <label><strong><?php _e("Value"); ?></strong><br /><textarea name="value" rows="2" cols="17"><?php echo $selected_input["value"]; ?></textarea></label>
679
  </td>
680
  <td style="vertical-align: middle;">
681
  <label><strong><?php _e("Type", $cimy_uef_domain); ?></strong><br />
682
- <select name="type">
683
  <?php
684
  foreach($available_types as $this_type) {
685
  echo '<option value="'.$this_type.'"'.$selected_input[$this_type].'>'.$this_type.'</option>';
@@ -693,27 +690,27 @@ function cimy_admin_define_extra_fields() {
693
  </label>
694
  <br /><br />
695
  <label><strong><?php _e("Fieldset", $cimy_uef_domain); ?></strong><br />
696
- <?php echo cimy_fieldsetOptions($fieldset); ?>
697
  </label>
698
  </td>
699
  <td style="vertical-align: middle;">
700
- <label><strong><?php _e("Label", $cimy_uef_domain); ?></strong><br /><textarea name="label" rows="2" cols="18"><?php echo $selected_input["label"]; ?></textarea></label><br /><br />
701
- <label><strong><?php _e("Description"); ?></strong><br /><textarea name="description" rows="4" cols="18"><?php echo $selected_input["desc"]; ?></textarea></label>
702
  </td>
703
  <td style="vertical-align: middle;">
704
  <!-- MIN LENGTH -->
705
- <input type="checkbox" name="minlen" value="1"<?php echo $selected_input["minlen"]; ?> /> <?php echo $min_length_caption; ?> [1-<?php echo $maxLen; ?>]: &nbsp;&nbsp;&nbsp;<input type="text" name="minlength" value="<?php echo $selected_input["min_length"]; ?>" maxlength="5" size="5" /><br />
706
 
707
  <!-- EXACT LENGTH -->
708
- <input type="checkbox" name="exactlen" value="1"<?php echo $selected_input["exactlen"]; ?> /> <?php echo $exact_length_caption; ?> [1-<?php echo $maxLen; ?>]: <input type="text" name="exactlength" value="<?php echo $selected_input["exact_length"]; ?>" maxlength="5" size="5" /><br />
709
 
710
  <!-- MAX LENGTH -->
711
- <input type="checkbox" name="maxlen" value="1"<?php echo $selected_input["maxlen"]; ?> /> <?php echo $max_length_caption; ?> [1-<?php echo $maxLen; ?>]: &nbsp;&nbsp;<input type="text" name="maxlength" value="<?php echo $selected_input["max_length"]; ?>" maxlength="5" size="5" /><br />
712
 
713
- <input type="checkbox" name="empty" value="1"<?php echo $selected_input["empty"]; ?> /> <?php _e("Can be empty", $cimy_uef_domain); ?><br />
714
- <input type="checkbox" name="email" value="1"<?php echo $selected_input["email"]; ?> /> <?php _e("Check for E-mail syntax", $cimy_uef_domain); ?><br />
715
 
716
- <select name="edit">
717
  <option value="ok_edit"<?php echo $selected_input["ok_edit"]; ?>><?php _e("Can be modified", $cimy_uef_domain); ?></option>
718
  <option value="edit_only_if_empty"<?php echo $selected_input["edit_only_if_empty"]; ?>><?php _e("Can be modified only if empty", $cimy_uef_domain); ?></option>
719
  <option value="edit_only_by_admin"<?php echo $selected_input["edit_only_by_admin"]; ?>><?php _e("Can be modified only by admin", $cimy_uef_domain); ?></option>
@@ -726,31 +723,31 @@ function cimy_admin_define_extra_fields() {
726
  </select>
727
  <br />
728
  <!-- EQUAL TO -->
729
- <input type="checkbox" name="equal" value="1"<?php echo $selected_input["equal"]; ?> /> <?php _e("Should be equal TO", $cimy_uef_domain); ?>: <input type="text" name="equalto" maxlength="100" value="<?php echo $selected_input["equal_to"]; ?>"/><br />
730
  <!-- CASE SENSITIVE -->
731
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_casesens" value="1"<?php echo $selected_input["equal_to_case_sensitive"]; ?> /> <?php _e("Case sensitive", $cimy_uef_domain); ?><br />
732
 
733
  <!-- REGEX -->
734
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_regex" value="1"<?php echo $selected_input["equal_to_regex"]; ?> /> <?php _e("Regular Expression", $cimy_uef_domain); ?><br />
735
 
736
  <!-- SHOW IN REGISTRATION -->
737
- <input type="checkbox" name="show_in_reg" value="1"<?php echo $selected_input["show_in_reg"]; ?> /> <?php _e("Show the field in the registration", $cimy_uef_domain); ?><br />
738
 
739
  <!-- SHOW IN PROFILE -->
740
- <input type="checkbox" name="show_in_profile" value="1"<?php echo $selected_input["show_in_profile"]; ?> /> <?php _e("Show the field in User's profile", $cimy_uef_domain); ?><br />
741
 
742
  <!-- SHOW IN A&U EXTENDED -->
743
- <input type="checkbox" name="show_in_aeu" value="1"<?php echo $selected_input["show_in_aeu"]; ?> /> <?php _e("Show the field in A&amp;U Extended menu", $cimy_uef_domain); ?><br />
744
 
745
  <!-- SHOW IN THE SEARCH ENGINE -->
746
- <input type="checkbox" name="show_in_search" value="1"<?php echo $selected_input["show_in_search"]; ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
747
 
748
  <!-- SHOW IN THE BLOG -->
749
- <input type="checkbox" name="show_in_blog" value="1"<?php echo $selected_input["show_in_blog"]; ?> /> <?php _e("Show the field in the blog", $cimy_uef_domain); ?><br />
750
 
751
  <!-- SHOW SECURITY LEVEL -->
752
  <?php _e("Show the field if the role is at least:", $cimy_uef_domain)." "; ?>
753
- <select name="show_level<?php echo $order ?>">
754
  <option value="-1"<?php echo $show_anonymous ?>><?php _e("Anonymous"); ?></option>
755
  <option value="0"<?php echo $show_subscriber ?>><?php echo translate_user_role("Subscriber"); ?></option>
756
  <option value="1"<?php echo $show_contributor ?>><?php echo translate_user_role("Contributor"); ?></option>
@@ -763,7 +760,7 @@ function cimy_admin_define_extra_fields() {
763
  <td align="center" style="vertical-align: middle;">
764
  <p class="submit" style="border-width: 0px;">
765
  <input name="reset" type="reset" value="<?php _e("Clear", $cimy_uef_domain); ?>" /><br /><br />
766
- <input class="button-primary" name="submit_add" type="submit" value="<?php echo $add_caption ?>" />
767
  </p>
768
  </td>
769
  </tr>
@@ -783,7 +780,7 @@ function cimy_admin_define_extra_fields() {
783
  }
784
 
785
  function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
786
- global $wpdb, $cimy_uef_domain, $rule_maxlen, $rule_email, $rule_canbeempty, $rule_equalto, $rule_equalto_case_sensitive, $available_types, $max_length_name, $max_length_label, $max_length_desc, $max_length_value, $max_size_file, $cimy_uef_file_types, $is_mu, $rule_equalto_regex;
787
 
788
  if (!cimy_check_admin("manage_options"))
789
  return;
@@ -867,10 +864,10 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
867
 
868
  $id = $field['ID'];
869
  $order = $field['F_ORDER'];
870
- $name = attribute_escape($field['NAME']);
871
- $value = attribute_escape($field['VALUE']);
872
- $desc = attribute_escape($field['DESCRIPTION']);
873
- $label = attribute_escape($field['LABEL']);
874
  $type = $field['TYPE'];
875
  $rules = $field['RULES'];
876
  $fieldset = $field["FIELDSET"];
@@ -991,14 +988,14 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
991
  $equalto_regex = "";
992
  }
993
 
994
- $equalTo = attribute_escape($equalTo);
995
 
996
  if ($rules['show_in_reg'])
997
  $show_in_reg = ' checked="checked"';
998
  else
999
  $show_in_reg = "";
1000
 
1001
- if ($is_mu) {
1002
  // uploading files not supported with WordPress MU
1003
  if (in_array($type, $cimy_uef_file_types)) {
1004
  $show_in_reg = ' disabled="disabled"';
@@ -1075,27 +1072,27 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
1075
 
1076
  <tr <?php echo "id=\"".$field_anchor.$order."\" ".$style; ?>>
1077
  <td align="center" style="vertical-align: middle;">
1078
- <input name="check<?php echo $order ?>" type="checkbox" value="1" /><br /><br />
1079
  <label><strong><?php _e("Order", $cimy_uef_domain); ?></strong><br />
1080
- <input name="order<?php echo $order ?>" type="text" value="<?php echo $order ?>" maxlength="4" size="3" /></label>
1081
  </td>
1082
  <td style="vertical-align: middle;">
1083
  <?php
1084
  if ($wp_fields) {
1085
  ?>
1086
- <input name="name<?php echo $order ?>" type="hidden" value="<?php echo $name ?>" />
1087
- <input name="type<?php echo $order ?>" type="hidden" value="<?php echo $type ?>" />
1088
  <?php
1089
  }
1090
  ?>
1091
  <label><strong><?php _e("Name"); ?></strong><br />
1092
- <input name="name<?php echo $order ?>" type="text" value="<?php echo $name ?>" maxlength="<?php echo $max_length_name ?>"<?php echo $disable_it; ?> /></label><br /><br />
1093
- <input name="oldname<?php echo $order ?>" type="hidden" value="<?php echo $name ?>" />
1094
  <label><strong><?php _e("Value"); ?></strong><br />
1095
- <textarea name="value<?php echo $order ?>" rows="2" cols="17"><?php echo $value; ?></textarea></label>
1096
  <br /><br />
1097
  <label><strong><?php _e("Type", $cimy_uef_domain); ?></strong><br />
1098
- <select name="type<?php echo $order ?>"<?php echo $disable_it; ?>>
1099
  <?php
1100
  foreach($available_types as $this_type) {
1101
  echo '<option value="'.$this_type.'"'.$selected_type[$this_type].'>'.$this_type.'</option>';
@@ -1117,26 +1114,26 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
1117
  </td>
1118
  <td style="vertical-align: middle;">
1119
  <label><strong><?php _e("Label", $cimy_uef_domain); ?></strong><br />
1120
- <textarea name="label<?php echo $order ?>" rows="2" cols="18"><?php echo $label; ?></textarea>
1121
  </label><br /><br />
1122
  <label><strong><?php _e("Description"); ?></strong><br />
1123
- <textarea name="description<?php echo $order ?>" rows="4" cols="18"><?php echo $desc ?></textarea>
1124
  </label>
1125
  </td>
1126
  <td style="vertical-align: middle;">
1127
  <!-- MIN LENGTH -->
1128
- <input type="checkbox" name="minlen<?php echo $order ?>" value="1"<?php echo $minlen.$dis_maxlength ?> /> <?php echo $min_length_caption; ?> [1-<?php echo $max_length_value_caption; ?>]: &nbsp;&nbsp;&nbsp;<input type="text" name="minlength<?php echo $order ?>" value="<?php echo $minLength ?>" maxlength="5" size="5"<?php echo $dis_maxlength ?> /><br />
1129
 
1130
  <!-- EXACT LENGTH -->
1131
- <input type="checkbox" name="exactlen<?php echo $order ?>" value="1"<?php echo $exactlen.$dis_maxlength ?> /> <?php echo $exact_length_caption; ?> [1-<?php echo $max_length_value_caption; ?>]: <input type="text" name="exactlength<?php echo $order ?>" value="<?php echo $exactLength ?>" maxlength="5" size="5"<?php echo $dis_maxlength ?> /><br />
1132
 
1133
  <!-- MAX LENGTH -->
1134
- <input type="checkbox" name="maxlen<?php echo $order ?>" value="1"<?php echo $maxlen.$dis_maxlength ?> /> <?php echo $max_length_caption; ?> [1-<?php echo $max_length_value_caption; ?>]: &nbsp;&nbsp;<input type="text" name="maxlength<?php echo $order ?>" value="<?php echo $maxLength ?>" maxlength="5" size="5"<?php echo $dis_maxlength ?> /><br />
1135
 
1136
- <input type="checkbox" name="empty<?php echo $order ?>" value="1"<?php echo $emp.$dis_canbeempty ?> /> <?php _e("Can be empty", $cimy_uef_domain); ?><br />
1137
- <input type="checkbox" name="email<?php echo $order ?>" value="1"<?php echo $email.$dis_checkemail ?> /> <?php _e("Check for E-mail syntax", $cimy_uef_domain); ?><br />
1138
 
1139
- <select name="edit<?php echo $order ?>">
1140
  <option value="ok_edit"<?php echo $okedit ?>><?php _e("Can be modified", $cimy_uef_domain); ?></option>
1141
  <option value="edit_only_if_empty"<?php echo $editonlyifempty ?>><?php _e("Can be modified only if empty", $cimy_uef_domain); ?></option>
1142
  <option value="edit_only_by_admin"<?php echo $editonlybyadmin ?>><?php _e("Can be modified only by admin", $cimy_uef_domain); ?></option>
@@ -1146,37 +1143,37 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
1146
  <br />
1147
 
1148
  <!-- EQUAL TO -->
1149
- <input type="checkbox" name="equal<?php echo $order ?>" value="1"<?php echo $equal.$dis_equalto ?> /> <?php _e("Should be equal TO", $cimy_uef_domain); ?>: <input type="text" name="equalto<?php echo $order ?>" maxlength="100" value="<?php echo $equalTo ?>"<?php echo $dis_equalto ?> /><br />
1150
  <!-- CASE SENSITIVE -->
1151
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_casesens<?php echo $order ?>" value="1"<?php echo $equalto_casesens.$dis_equalto_casesens; ?> /> <?php _e("Case sensitive", $cimy_uef_domain); ?><br />
1152
  <!-- REGEX -->
1153
- &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_regex<?php echo $order ?>" value="1"<?php echo $equalto_regex.$dis_equalto_regex; ?> /> <?php _e("Regular Expression", $cimy_uef_domain); ?><br />
1154
 
1155
 
1156
  <!-- SHOW IN REGISTRATION -->
1157
- <input type="checkbox" name="show_in_reg<?php echo $order ?>" value="1"<?php echo $show_in_reg ?> /> <?php _e("Show the field in the registration", $cimy_uef_domain); ?><br />
1158
 
1159
  <!-- SHOW IN PROFILE -->
1160
- <input type="checkbox" name="show_in_profile<?php echo $order ?>" value="1"<?php echo $show_in_profile ?><?php echo $disable_it; ?> /> <?php _e("Show the field in User's profile", $cimy_uef_domain); ?><br />
1161
  <?php
1162
  if ($wp_fields) {
1163
  ?>
1164
- <input name="show_in_profile<?php echo $order ?>" type="hidden" value="1" />
1165
  <?php
1166
  }
1167
  ?>
1168
  <!-- SHOW IN A&U EXTENDED -->
1169
- <input type="checkbox" name="show_in_aeu<?php echo $order ?>" value="1"<?php echo $show_in_aeu ?> /> <?php _e("Show the field in A&amp;U Extended menu", $cimy_uef_domain); ?><br />
1170
 
1171
  <!-- SHOW IN THE SEARCH -->
1172
- <input type="checkbox" name="show_in_search<?php echo $order ?>" value="1"<?php echo $show_in_search ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
1173
 
1174
  <!-- SHOW IN THE BLOG -->
1175
- <input type="checkbox" name="show_in_blog<?php echo $order ?>" value="1"<?php echo $show_in_blog ?> /> <?php _e("Show the field in the blog", $cimy_uef_domain); ?><br />
1176
 
1177
  <!-- SHOW SECURITY LEVEL -->
1178
  <?php _e("Show the field if the role is at least:", $cimy_uef_domain)." "; ?>
1179
- <select name="show_level<?php echo $order ?>">
1180
  <option value="-1"<?php echo $show_anonymous ?>><?php _e("Anonymous"); ?></option>
1181
  <option value="0"<?php echo $show_subscriber ?>><?php echo translate_user_role("Subscriber"); ?></option>
1182
  <option value="1"<?php echo $show_contributor ?>><?php echo translate_user_role("Contributor"); ?></option>
@@ -1189,10 +1186,10 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
1189
  <td align="center" style="vertical-align: middle;">
1190
  <p class="submit" style="border-width: 0px;">
1191
  <input name="reset" type="reset" value="<?php _e("Reset", $cimy_uef_domain); ?>" /><br /><br />
1192
- <input class="button-primary" name="submit_edit" type="submit" value="<?php echo $edit_caption." #".$order ?>" /><br /><br />
1193
 
1194
  <?php if (!$wp_fields) { ?>
1195
- <input name="submit_del" type="submit" value="<?php echo $del_caption." #".$order ?>" onclick="return confirm('<?php echo $delete_fields_label; ?>');" />
1196
  <?php } ?>
1197
  </p>
1198
  </td>
@@ -1223,7 +1220,7 @@ function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
1223
  }
1224
 
1225
  function cimy_admin_users_list_page() {
1226
- global $wpdb, $wp_roles, $wpdb_data_table, $cimy_uef_options, $cuef_upload_path, $cimy_uef_domain, $is_mu;
1227
 
1228
  if (!cimy_check_admin('edit_users'))
1229
  return;
@@ -1345,7 +1342,7 @@ function cimy_admin_users_list_page() {
1345
  <h2><?php printf(__('Users Matching "%s"'), wp_specialchars($wp_user_search->search_term)); ?></h2>
1346
  <?php else : ?>
1347
  <h2><?php
1348
- if ($is_mu)
1349
  _e("Users Extended List", $cimy_uef_domain);
1350
  else
1351
  _e("Authors &amp; Users Extended List", $cimy_uef_domain);
@@ -1373,23 +1370,22 @@ function cimy_admin_users_list_page() {
1373
 
1374
  $current_role = false;
1375
  $class = empty($_GET['role']) ? ' class="current"' : '';
1376
- $role_links[] = "<li><a href=\"users.php?page=au_extended\"$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users ), number_format_i18n( $total_users ) ) . '</a>';
1377
-
1378
- foreach ( $wp_roles->get_names() as $role => $name ) {
1379
- if ( !isset($avail_roles[$role]) )
1380
  continue;
1381
 
1382
  $class = '';
1383
 
1384
- if ( $role == $_GET['role'] ) {
1385
  $current_role = $_GET['role'];
1386
  $class = ' class="current"';
1387
  }
1388
 
1389
- $name = translate_with_context($name);
1390
- $name = sprintf(_c('%1$s (%2$s)|user role with count'), $name, $avail_roles[$role]);
1391
-
1392
- $tmp_link = clean_url(add_query_arg('role', $role));
1393
  $role_links[] = "<li><a href=\"$tmp_link\"$class>" . $name . '</a>';
1394
  }
1395
 
@@ -1399,7 +1395,7 @@ function cimy_admin_users_list_page() {
1399
  </ul>
1400
 
1401
  <p id="post-search" class="search-box">
1402
- <input type="text" class="search-input" id="post-search-input" name="usersearch" value="<?php echo attribute_escape($wp_user_search->search_term); ?>" />
1403
  <input type="submit" value="<?php _e( 'Search Users' ); ?>" class="button" />
1404
  </p>
1405
 
@@ -1432,7 +1428,6 @@ function cimy_admin_users_list_page() {
1432
  wp_print_scripts('admin-forms');
1433
  ?>
1434
  <div class="alignleft actions">
1435
- <form action="" method="post">
1436
  <?php _e("Users per page", $cimy_uef_domain); ?>
1437
  <select name="cimy_uef_users_per_page">
1438
  <?php
@@ -1449,7 +1444,6 @@ function cimy_admin_users_list_page() {
1449
  ?>
1450
  </select>
1451
  <input class="button" type="submit" name="submit" value="<?php _e("Apply"); ?>" />
1452
- </form>
1453
  </div>
1454
  </div>
1455
 
@@ -1512,9 +1506,9 @@ function cimy_admin_users_list_page() {
1512
 
1513
  if (!empty($_POST["ef_search"][$name])) {
1514
  if ($type == "dropdown-multi")
1515
- $search_value = attribute_escape(stripslashes(implode(",", $_POST["ef_search"][$name])));
1516
  else
1517
- $search_value = attribute_escape(stripslashes($_POST["ef_search"][$name]));
1518
  }
1519
 
1520
  $thead_str.= "<th scope=\"col\" class=\"manage-column\" style=\"\">";
@@ -1580,7 +1574,9 @@ function cimy_admin_users_list_page() {
1580
 
1581
  foreach ($wp_user_search->get_results() as $userid) {
1582
  $user_object = new WP_User($userid);
1583
-
 
 
1584
  $email = $user_object->user_email;
1585
  $url = $user_object->user_url;
1586
  $short_url = str_replace('http://', '', $url);
@@ -1593,7 +1589,7 @@ function cimy_admin_users_list_page() {
1593
  $short_url = substr($short_url, 0, 32).'...';
1594
 
1595
  $style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
1596
- $numposts = get_usernumposts( $user_object->ID );
1597
 
1598
  if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "'>$numposts</a>";
1599
  echo "
@@ -1610,7 +1606,7 @@ function cimy_admin_users_list_page() {
1610
  if ($current_user->ID == $user_object->ID) {
1611
  $edit = 'profile.php';
1612
  } else {
1613
- $edit = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) );
1614
  }
1615
  $edit = "<a href=\"$edit\">$user_object->user_login</a>";
1616
  } else {
@@ -1630,9 +1626,7 @@ function cimy_admin_users_list_page() {
1630
  }
1631
 
1632
  if (!in_array("role", $options['aue_hidden_fields'])) {
1633
- $roles = $user_object->roles;
1634
- $role = array_shift($roles);
1635
- $role_name = translate_with_context($wp_roles->role_names[$role]);
1636
 
1637
  echo "<td class=\"role column-role\">";
1638
  echo $role_name;
@@ -1675,7 +1669,7 @@ function cimy_admin_users_list_page() {
1675
  foreach ($ef_db as $d_field) {
1676
  if ($d_field['FIELD_ID'] == $field_id) {
1677
  $field = cimy_uef_sanitize_content($d_field['VALUE']);
1678
- //$field = attribute_escape($d_field['VALUE']);
1679
  }
1680
  }
1681
 
@@ -1798,7 +1792,7 @@ function cimy_save_field($action, $table, $data) {
1798
  $store_rule = $wpdb->escape(serialize($data['store_rule']));
1799
  $field_order = $wpdb->escape($data['field_order']);
1800
  $num_fields = $wpdb->escape($data['num_fields']);
1801
-
1802
  if ($action == "add")
1803
  $sql = "INSERT INTO ".$table." ";
1804
  else if ($action == "edit")
1
  <?php
2
 
3
  function cimy_admin_define_extra_fields() {
4
+ global $wpdb, $wpdb_fields_table, $wpdb_wp_fields_table, $rule_canbeempty, $rule_email, $rule_maxlen, $rule_maxlen_needed, $available_types, $max_length_name, $max_length_label, $max_length_desc, $max_length_value, $max_size_file, $rule_equalto, $rule_equalto_case_sensitive, $cimy_uef_domain, $cuef_plugin_path, $cimy_uef_file_types, $rule_equalto_regex;
5
 
6
  if (!cimy_check_admin('manage_options'))
7
  return;
8
+ // if (!empty($_POST))
9
+ // print_r($_POST);
10
 
11
  $errors = Array();
12
  $results = Array();
35
  $submit = "";
36
 
37
  $action = "";
38
+ // defaults to add
39
+ $field_order = "0";
40
 
41
  // options form engine
42
  if (isset($_POST['cimy_options'])) {
43
  $action = "options";
44
  $res = cimy_save_options();
45
  }
46
+ else if ((isset($_POST["submit_add"])) && (!empty($_POST["submit_add"]))) {
47
  $action = "add";
48
  $submit = $_POST["submit_add"];
49
  }
50
+ else if ((isset($_POST["submit_edit"])) && (!empty($_POST["submit_edit"]))) {
51
  $action = "edit";
52
  $submit = $_POST["submit_edit"];
53
  }
54
+ else if ((isset($_POST["submit_del"])) && (!empty($_POST["submit_del"]))) {
55
  $action = "del";
56
  $submit = $_POST["submit_del"];
57
  }
58
+ else if ((isset($_POST["submit_del_sel"])) && (!empty($_POST["submit_del_sel"]))) {
59
  $action = "delSel";
60
  $submit = $_POST["submit_del_sel"];
61
  }
62
+ else if ((isset($_POST["submit_order"])) && (!empty($_POST["submit_order"]))) {
63
  $action = "order";
64
  $submit = $_POST["submit_order"];
65
  }
70
  // call options draw function
71
  $opt_ret = cimy_show_options($res, true);
72
 
73
+ // needed fields count here, after options and before $action manager! do not move!
74
  $num_fields = $opt_ret['db_extra_fields'];
75
  $num_wp_fields = $opt_ret['db_wp_fields'];
76
 
87
 
88
  // if pushed change order button
89
  if ($action == "order") {
 
90
  $sql = "UPDATE ".$fields_table." SET F_ORDER=CASE F_ORDER";
 
91
  $k = (-1);
92
  $msg = "";
93
  $msg_new = "";
94
  $arr1 = Array();
95
  $arr2 = Array();
96
 
97
+ // check only selected fields
98
+ foreach ($_POST['check'] as $i) {
99
+ if ($k > (-1)) {
100
+ $msg.= ", ";
101
+ $msg_new.= ", ";
 
 
 
 
 
 
 
 
 
 
 
102
  }
103
+ else
104
+ $k = $i;
105
+
106
+ $sql.= " WHEN ".$i." THEN ".$_POST['order'][$i];
107
+ $msg.= $i;
108
+ $msg_new.= $_POST['order'][$i];
109
 
110
+ array_push($arr1, $i);
111
+ array_push($arr2, $_POST['order'][$i]);
112
+ }
113
  if ($k > (-1)) {
114
  if (count(array_diff($arr1, $arr2)) == 0) {
115
  $sql.= " ELSE F_ORDER END WHERE F_ORDER IN (".$msg.")";
128
 
129
  // if pushed delete or update single button
130
  if (($action == "del") || ($action == "edit")) {
131
+ $field_order = key($submit);
 
 
132
 
133
  // if pushed the single delete button then check the relative checkbox and let delSel code to delete it
134
  if ($action == "del") {
135
+ $_POST['check'][$field_order] = $field_order;
136
  $action = "delSel";
137
  }
138
  }
149
 
150
  // check which fields are selected for deletions
151
  for ($i = 1; $i <= $tot_fields; $i++)
152
+ if ($_POST['check'][$i]) {
153
  if ($k > (-1)) {
154
  $sql.= " OR ";
155
  $sql_data_del.= " OR ";
199
 
200
  if (($action == "add") || ($action == "edit")) {
201
  $store_rule = array();
202
+
203
  // RETRIEVE DATA FROM THE FORM
204
+ $name = substr(stripslashes($_POST['name'][$field_order]), 0, $max_length_name);
205
+ $value = substr(stripslashes($_POST['value'][$field_order]), 0, $max_length_value);
206
+ $desc = substr(stripslashes($_POST['description'][$field_order]), 0, $max_length_desc);
207
+ $label = substr(stripslashes($_POST['label'][$field_order]), 0, $max_length_label);
208
 
209
  $name = strtoupper($name);
210
+ $oldname = strtoupper(stripslashes($_POST['oldname'][$field_order]));
211
+ $type = $_POST['type'][$field_order];
212
+ $fieldset = $_POST['fieldset'][$field_order];
213
 
214
+ $minlen = $_POST['minlen'][$field_order];
215
+ $exactlen = $_POST['exactlen'][$field_order];
216
+ $maxlen = $_POST['maxlen'][$field_order];
217
 
218
  // min length available
219
  $minLen = 1;
234
  /* end overwrite previous values */
235
 
236
  if ($minlen != "")
237
+ $store_rule['min_length'] = intval($_POST['minlength'][$field_order]);
238
 
239
  if ($exactlen != "")
240
+ $store_rule['exact_length'] = intval($_POST['exactlength'][$field_order]);
241
 
242
  if ($maxlen != "")
243
+ $store_rule['max_length'] = intval($_POST['maxlength'][$field_order]);
244
 
245
+ $empty = $_POST['empty'][$field_order];
246
  $empty == "1" ? $store_rule['can_be_empty'] = true : $store_rule['can_be_empty'] = false;
247
 
248
  $store_rule['edit'] = $_POST['edit'.$field_order];
249
 
250
+ $email = $_POST['email'][$field_order];
251
  $email == "1" ? $store_rule['email'] = true : $store_rule['email'] = false;
252
+ $equal = $_POST['equal'][$field_order];
253
 
254
  if ($equal != "") {
255
+ $store_rule['equal_to'] = stripslashes($_POST['equalto'][$field_order]);
256
 
257
+ $equalto_casesens = $_POST['equalto_casesens'][$field_order];
258
 
259
+ $equalto_regex = $_POST['equalto_regex'][$field_order];
260
  }
261
 
262
+ $show_in_reg = $_POST['show_in_reg'][$field_order];
263
  $show_in_reg == "1" ? $store_rule['show_in_reg'] = true : $store_rule['show_in_reg'] = false;
264
 
265
+ $show_in_profile = $_POST['show_in_profile'][$field_order];
266
  $show_in_profile == "1" ? $store_rule['show_in_profile'] = true : $store_rule['show_in_profile'] = false;
267
 
268
+ $show_in_aeu = $_POST['show_in_aeu'][$field_order];
269
  $show_in_aeu == "1" ? $store_rule['show_in_aeu'] = true : $store_rule['show_in_aeu'] = false;
270
 
271
+ $show_in_search = $_POST['show_in_search'][$field_order];
272
  $show_in_search == "1" ? $store_rule['show_in_search'] = true : $store_rule['show_in_search'] = false;
273
 
274
+ $show_in_blog = $_POST['show_in_blog'][$field_order];
275
  $show_in_blog == "1" ? $store_rule['show_in_blog'] = true : $store_rule['show_in_blog'] = false;
276
 
277
+ $show_level = $_POST['show_level'][$field_order];
278
  $store_rule['show_level'] = $show_level;
279
 
280
  // START CHECKING FOR ERRORS
350
  $errors['value'] = __("With radio type Value can only be", $cimy_uef_domain).": [Yes, No]";
351
  }
352
 
353
+ if (is_multisite()) {
354
  // uploading files not supported with WordPress MU
355
  if (in_array($type, $cimy_uef_file_types)) {
356
  $store_rule["show_in_reg"] = false;
638
  else
639
  $selected_input["show_in_blog"] = '';
640
 
641
+ $selected_input["name"] = esc_attr($selected_input["name"]);
642
+ $selected_input["value"] = esc_attr($selected_input["value"]);
643
+ $selected_input["label"] = esc_attr($selected_input["label"]);
644
+ $selected_input["desc"] = esc_attr($selected_input["desc"]);
645
+ $selected_input["equal_to"] = esc_attr($selected_input["equal_to"]);
646
  ?>
647
 
648
  <form method="post" action="#addfield">
671
  <tbody id="plugins" class="plugins">
672
  <tr class="active">
673
  <td style="vertical-align: middle;">
674
+ <label><strong><?php _e("Name"); ?></strong><br /><input name="name[0]" type="text" value="<?php echo $selected_input["name"]; ?>" maxlength="<?php echo $max_length_name; ?>" /></label><br /><br />
675
+ <label><strong><?php _e("Value"); ?></strong><br /><textarea name="value[0]" rows="2" cols="17"><?php echo $selected_input["value"]; ?></textarea></label>
676
  </td>
677
  <td style="vertical-align: middle;">
678
  <label><strong><?php _e("Type", $cimy_uef_domain); ?></strong><br />
679
+ <select name="type[0]">
680
  <?php
681
  foreach($available_types as $this_type) {
682
  echo '<option value="'.$this_type.'"'.$selected_input[$this_type].'>'.$this_type.'</option>';
690
  </label>
691
  <br /><br />
692
  <label><strong><?php _e("Fieldset", $cimy_uef_domain); ?></strong><br />
693
+ <?php echo cimy_fieldsetOptions($fieldset, "0"); ?>
694
  </label>
695
  </td>
696
  <td style="vertical-align: middle;">
697
+ <label><strong><?php _e("Label", $cimy_uef_domain); ?></strong><br /><textarea name="label[0]" rows="2" cols="18"><?php echo $selected_input["label"]; ?></textarea></label><br /><br />
698
+ <label><strong><?php _e("Description"); ?></strong><br /><textarea name="description[0]" rows="4" cols="18"><?php echo $selected_input["desc"]; ?></textarea></label>
699
  </td>
700
  <td style="vertical-align: middle;">
701
  <!-- MIN LENGTH -->
702
+ <input type="checkbox" name="minlen[0]" value="1"<?php echo $selected_input["minlen"]; ?> /> <?php echo $min_length_caption; ?> [1-<?php echo $maxLen; ?>]: &nbsp;&nbsp;&nbsp;<input type="text" name="minlength[0]" value="<?php echo $selected_input["min_length"]; ?>" maxlength="5" size="5" /><br />
703
 
704
  <!-- EXACT LENGTH -->
705
+ <input type="checkbox" name="exactlen[0]" value="1"<?php echo $selected_input["exactlen"]; ?> /> <?php echo $exact_length_caption; ?> [1-<?php echo $maxLen; ?>]: <input type="text" name="exactlength[0]" value="<?php echo $selected_input["exact_length"]; ?>" maxlength="5" size="5" /><br />
706
 
707
  <!-- MAX LENGTH -->
708
+ <input type="checkbox" name="maxlen[0]" value="1"<?php echo $selected_input["maxlen"]; ?> /> <?php echo $max_length_caption; ?> [1-<?php echo $maxLen; ?>]: &nbsp;&nbsp;<input type="text" name="maxlength[0]" value="<?php echo $selected_input["max_length"]; ?>" maxlength="5" size="5" /><br />
709
 
710
+ <input type="checkbox" name="empty[0]" value="1"<?php echo $selected_input["empty"]; ?> /> <?php _e("Can be empty", $cimy_uef_domain); ?><br />
711
+ <input type="checkbox" name="email[0]" value="1"<?php echo $selected_input["email"]; ?> /> <?php _e("Check for E-mail syntax", $cimy_uef_domain); ?><br />
712
 
713
+ <select name="edit[0]">
714
  <option value="ok_edit"<?php echo $selected_input["ok_edit"]; ?>><?php _e("Can be modified", $cimy_uef_domain); ?></option>
715
  <option value="edit_only_if_empty"<?php echo $selected_input["edit_only_if_empty"]; ?>><?php _e("Can be modified only if empty", $cimy_uef_domain); ?></option>
716
  <option value="edit_only_by_admin"<?php echo $selected_input["edit_only_by_admin"]; ?>><?php _e("Can be modified only by admin", $cimy_uef_domain); ?></option>
723
  </select>
724
  <br />
725
  <!-- EQUAL TO -->
726
+ <input type="checkbox" name="equal[0]" value="1"<?php echo $selected_input["equal"]; ?> /> <?php _e("Should be equal TO", $cimy_uef_domain); ?>: <input type="text" name="equalto[0]" maxlength="100" value="<?php echo $selected_input["equal_to"]; ?>"/><br />
727
  <!-- CASE SENSITIVE -->
728
+ &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_casesens[0]" value="1"<?php echo $selected_input["equal_to_case_sensitive"]; ?> /> <?php _e("Case sensitive", $cimy_uef_domain); ?><br />
729
 
730
  <!-- REGEX -->
731
+ &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_regex[0]" value="1"<?php echo $selected_input["equal_to_regex"]; ?> /> <?php _e("Regular Expression", $cimy_uef_domain); ?><br />
732
 
733
  <!-- SHOW IN REGISTRATION -->
734
+ <input type="checkbox" name="show_in_reg[0]" value="1"<?php echo $selected_input["show_in_reg"]; ?> /> <?php _e("Show the field in the registration", $cimy_uef_domain); ?><br />
735
 
736
  <!-- SHOW IN PROFILE -->
737
+ <input type="checkbox" name="show_in_profile[0]" value="1"<?php echo $selected_input["show_in_profile"]; ?> /> <?php _e("Show the field in User's profile", $cimy_uef_domain); ?><br />
738
 
739
  <!-- SHOW IN A&U EXTENDED -->
740
+ <input type="checkbox" name="show_in_aeu[0]" value="1"<?php echo $selected_input["show_in_aeu"]; ?> /> <?php _e("Show the field in A&amp;U Extended menu", $cimy_uef_domain); ?><br />
741
 
742
  <!-- SHOW IN THE SEARCH ENGINE -->
743
+ <input type="checkbox" name="show_in_search[0]" value="1"<?php echo $selected_input["show_in_search"]; ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
744
 
745
  <!-- SHOW IN THE BLOG -->
746
+ <input type="checkbox" name="show_in_blog[0]" value="1"<?php echo $selected_input["show_in_blog"]; ?> /> <?php _e("Show the field in the blog", $cimy_uef_domain); ?><br />
747
 
748
  <!-- SHOW SECURITY LEVEL -->
749
  <?php _e("Show the field if the role is at least:", $cimy_uef_domain)." "; ?>
750
+ <select name="show_level[0]">
751
  <option value="-1"<?php echo $show_anonymous ?>><?php _e("Anonymous"); ?></option>
752
  <option value="0"<?php echo $show_subscriber ?>><?php echo translate_user_role("Subscriber"); ?></option>
753
  <option value="1"<?php echo $show_contributor ?>><?php echo translate_user_role("Contributor"); ?></option>
760
  <td align="center" style="vertical-align: middle;">
761
  <p class="submit" style="border-width: 0px;">
762
  <input name="reset" type="reset" value="<?php _e("Clear", $cimy_uef_domain); ?>" /><br /><br />
763
+ <input class="button-primary" name="submit_add[0]" type="submit" value="<?php echo $add_caption ?>" />
764
  </p>
765
  </td>
766
  </tr>
780
  }
781
 
782
  function cimy_admin_show_extra_fields($allFields, $submit_msgs, $wp_fields) {
783
+ global $wpdb, $cimy_uef_domain, $rule_maxlen, $rule_email, $rule_canbeempty, $rule_equalto, $rule_equalto_case_sensitive, $available_types, $max_length_name, $max_length_label, $max_length_desc, $max_length_value, $max_size_file, $cimy_uef_file_types, $rule_equalto_regex;
784
 
785
  if (!cimy_check_admin("manage_options"))
786
  return;
864
 
865
  $id = $field['ID'];
866
  $order = $field['F_ORDER'];
867
+ $name = esc_attr($field['NAME']);
868
+ $value = esc_attr($field['VALUE']);
869
+ $desc = esc_attr($field['DESCRIPTION']);
870
+ $label = esc_attr($field['LABEL']);
871
  $type = $field['TYPE'];
872
  $rules = $field['RULES'];
873
  $fieldset = $field["FIELDSET"];
988
  $equalto_regex = "";
989
  }
990
 
991
+ $equalTo = esc_attr($equalTo);
992
 
993
  if ($rules['show_in_reg'])
994
  $show_in_reg = ' checked="checked"';
995
  else
996
  $show_in_reg = "";
997
 
998
+ if (is_multisite()) {
999
  // uploading files not supported with WordPress MU
1000
  if (in_array($type, $cimy_uef_file_types)) {
1001
  $show_in_reg = ' disabled="disabled"';
1072
 
1073
  <tr <?php echo "id=\"".$field_anchor.$order."\" ".$style; ?>>
1074
  <td align="center" style="vertical-align: middle;">
1075
+ <input name="check[<?php echo $order ?>]" type="checkbox" value="<?php echo $order ?>" /><br /><br />
1076
  <label><strong><?php _e("Order", $cimy_uef_domain); ?></strong><br />
1077
+ <input name="order[<?php echo $order ?>]" type="text" value="<?php echo $order ?>" maxlength="4" size="3" /></label>
1078
  </td>
1079
  <td style="vertical-align: middle;">
1080
  <?php
1081
  if ($wp_fields) {
1082
  ?>
1083
+ <input name="name[<?php echo $order ?>]" type="hidden" value="<?php echo $name ?>" />
1084
+ <input name="type[<?php echo $order ?>]" type="hidden" value="<?php echo $type ?>" />
1085
  <?php
1086
  }
1087
  ?>
1088
  <label><strong><?php _e("Name"); ?></strong><br />
1089
+ <input name="name[<?php echo $order ?>]" type="text" value="<?php echo $name ?>" maxlength="<?php echo $max_length_name ?>"<?php echo $disable_it; ?> /></label><br /><br />
1090
+ <input name="oldname[<?php echo $order ?>]" type="hidden" value="<?php echo $name ?>" />
1091
  <label><strong><?php _e("Value"); ?></strong><br />
1092
+ <textarea name="value[<?php echo $order ?>]" rows="2" cols="17"><?php echo $value; ?></textarea></label>
1093
  <br /><br />
1094
  <label><strong><?php _e("Type", $cimy_uef_domain); ?></strong><br />
1095
+ <select name="type[<?php echo $order ?>]"<?php echo $disable_it; ?>>
1096
  <?php
1097
  foreach($available_types as $this_type) {
1098
  echo '<option value="'.$this_type.'"'.$selected_type[$this_type].'>'.$this_type.'</option>';
1114
  </td>
1115
  <td style="vertical-align: middle;">
1116
  <label><strong><?php _e("Label", $cimy_uef_domain); ?></strong><br />
1117
+ <textarea name="label[<?php echo $order ?>]" rows="2" cols="18"><?php echo $label; ?></textarea>
1118
  </label><br /><br />
1119
  <label><strong><?php _e("Description"); ?></strong><br />
1120
+ <textarea name="description[<?php echo $order ?>]" rows="4" cols="18"><?php echo $desc ?></textarea>
1121
  </label>
1122
  </td>
1123
  <td style="vertical-align: middle;">
1124
  <!-- MIN LENGTH -->
1125
+ <input type="checkbox" name="minlen[<?php echo $order ?>]" value="1"<?php echo $minlen.$dis_maxlength ?> /> <?php echo $min_length_caption; ?> [1-<?php echo $max_length_value_caption; ?>]: &nbsp;&nbsp;&nbsp;<input type="text" name="minlength[<?php echo $order ?>]" value="<?php echo $minLength ?>" maxlength="5" size="5"<?php echo $dis_maxlength ?> /><br />
1126
 
1127
  <!-- EXACT LENGTH -->
1128
+ <input type="checkbox" name="exactlen[<?php echo $order ?>]" value="1"<?php echo $exactlen.$dis_maxlength ?> /> <?php echo $exact_length_caption; ?> [1-<?php echo $max_length_value_caption; ?>]: <input type="text" name="exactlength[<?php echo $order ?>]" value="<?php echo $exactLength ?>" maxlength="5" size="5"<?php echo $dis_maxlength ?> /><br />
1129
 
1130
  <!-- MAX LENGTH -->
1131
+ <input type="checkbox" name="maxlen[<?php echo $order ?>]" value="1"<?php echo $maxlen.$dis_maxlength ?> /> <?php echo $max_length_caption; ?> [1-<?php echo $max_length_value_caption; ?>]: &nbsp;&nbsp;<input type="text" name="maxlength[<?php echo $order ?>]" value="<?php echo $maxLength ?>" maxlength="5" size="5"<?php echo $dis_maxlength ?> /><br />
1132
 
1133
+ <input type="checkbox" name="empty[<?php echo $order ?>]" value="1"<?php echo $emp.$dis_canbeempty ?> /> <?php _e("Can be empty", $cimy_uef_domain); ?><br />
1134
+ <input type="checkbox" name="email[<?php echo $order ?>]" value="1"<?php echo $email.$dis_checkemail ?> /> <?php _e("Check for E-mail syntax", $cimy_uef_domain); ?><br />
1135
 
1136
+ <select name="edit[<?php echo $order ?>]">
1137
  <option value="ok_edit"<?php echo $okedit ?>><?php _e("Can be modified", $cimy_uef_domain); ?></option>
1138
  <option value="edit_only_if_empty"<?php echo $editonlyifempty ?>><?php _e("Can be modified only if empty", $cimy_uef_domain); ?></option>
1139
  <option value="edit_only_by_admin"<?php echo $editonlybyadmin ?>><?php _e("Can be modified only by admin", $cimy_uef_domain); ?></option>
1143
  <br />
1144
 
1145
  <!-- EQUAL TO -->
1146
+ <input type="checkbox" name="equal[<?php echo $order ?>]" value="1"<?php echo $equal.$dis_equalto ?> /> <?php _e("Should be equal TO", $cimy_uef_domain); ?>: <input type="text" name="equalto[<?php echo $order ?>]" maxlength="100" value="<?php echo $equalTo ?>"<?php echo $dis_equalto ?> /><br />
1147
  <!-- CASE SENSITIVE -->
1148
+ &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_casesens[<?php echo $order ?>]" value="1"<?php echo $equalto_casesens.$dis_equalto_casesens; ?> /> <?php _e("Case sensitive", $cimy_uef_domain); ?><br />
1149
  <!-- REGEX -->
1150
+ &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="equalto_regex[<?php echo $order ?>]" value="1"<?php echo $equalto_regex.$dis_equalto_regex; ?> /> <?php _e("Regular Expression", $cimy_uef_domain); ?><br />
1151
 
1152
 
1153
  <!-- SHOW IN REGISTRATION -->
1154
+ <input type="checkbox" name="show_in_reg[<?php echo $order ?>]" value="1"<?php echo $show_in_reg ?> /> <?php _e("Show the field in the registration", $cimy_uef_domain); ?><br />
1155
 
1156
  <!-- SHOW IN PROFILE -->
1157
+ <input type="checkbox" name="show_in_profile[<?php echo $order ?>]" value="1"<?php echo $show_in_profile ?><?php echo $disable_it; ?> /> <?php _e("Show the field in User's profile", $cimy_uef_domain); ?><br />
1158
  <?php
1159
  if ($wp_fields) {
1160
  ?>
1161
+ <input name="show_in_profile[<?php echo $order ?>]" type="hidden" value="1" />
1162
  <?php
1163
  }
1164
  ?>
1165
  <!-- SHOW IN A&U EXTENDED -->
1166
+ <input type="checkbox" name="show_in_aeu[<?php echo $order ?>]" value="1"<?php echo $show_in_aeu ?> /> <?php _e("Show the field in A&amp;U Extended menu", $cimy_uef_domain); ?><br />
1167
 
1168
  <!-- SHOW IN THE SEARCH -->
1169
+ <input type="checkbox" name="show_in_search[<?php echo $order ?>]" value="1"<?php echo $show_in_search ?> /> <?php _e("Show the field in the search engine", $cimy_uef_domain); ?><br />
1170
 
1171
  <!-- SHOW IN THE BLOG -->
1172
+ <input type="checkbox" name="show_in_blog[<?php echo $order ?>]" value="1"<?php echo $show_in_blog ?> /> <?php _e("Show the field in the blog", $cimy_uef_domain); ?><br />
1173
 
1174
  <!-- SHOW SECURITY LEVEL -->
1175
  <?php _e("Show the field if the role is at least:", $cimy_uef_domain)." "; ?>
1176
+ <select name="show_level[<?php echo $order ?>]">
1177
  <option value="-1"<?php echo $show_anonymous ?>><?php _e("Anonymous"); ?></option>
1178
  <option value="0"<?php echo $show_subscriber ?>><?php echo translate_user_role("Subscriber"); ?></option>
1179
  <option value="1"<?php echo $show_contributor ?>><?php echo translate_user_role("Contributor"); ?></option>
1186
  <td align="center" style="vertical-align: middle;">
1187
  <p class="submit" style="border-width: 0px;">
1188
  <input name="reset" type="reset" value="<?php _e("Reset", $cimy_uef_domain); ?>" /><br /><br />
1189
+ <input class="button-primary" name="submit_edit[<?php echo $order ?>]" type="submit" value="<?php echo $edit_caption." #".$order ?>" /><br /><br />
1190
 
1191
  <?php if (!$wp_fields) { ?>
1192
+ <input name="submit_del[<?php echo $order ?>]" type="submit" value="<?php echo $del_caption." #".$order ?>" onclick="return confirm('<?php echo $delete_fields_label; ?>');" />
1193
  <?php } ?>
1194
  </p>
1195
  </td>
1220
  }
1221
 
1222
  function cimy_admin_users_list_page() {
1223
+ global $wpdb, $wp_roles, $wpdb_data_table, $cimy_uef_options, $cuef_upload_path, $cimy_uef_domain;
1224
 
1225
  if (!cimy_check_admin('edit_users'))
1226
  return;
1342
  <h2><?php printf(__('Users Matching "%s"'), wp_specialchars($wp_user_search->search_term)); ?></h2>
1343
  <?php else : ?>
1344
  <h2><?php
1345
+ if (is_multisite())
1346
  _e("Users Extended List", $cimy_uef_domain);
1347
  else
1348
  _e("Authors &amp; Users Extended List", $cimy_uef_domain);
1370
 
1371
  $current_role = false;
1372
  $class = empty($_GET['role']) ? ' class="current"' : '';
1373
+ $role_links[] = "<li><a href='users.php?page=au_extended'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';
1374
+
1375
+ foreach ( $wp_roles->get_names() as $this_role => $name ) {
1376
+ if ( !isset($avail_roles[$this_role]) )
1377
  continue;
1378
 
1379
  $class = '';
1380
 
1381
+ if ( $this_role == $_GET['role'] ) {
1382
  $current_role = $_GET['role'];
1383
  $class = ' class="current"';
1384
  }
1385
 
1386
+ $name = translate_user_role( $name );
1387
+ $name = sprintf( __('%1$s <span class="count">(%2$s)</span>'), $name, $avail_roles[$this_role] );
1388
+ $tmp_link = esc_url(add_query_arg('role', $this_role));
 
1389
  $role_links[] = "<li><a href=\"$tmp_link\"$class>" . $name . '</a>';
1390
  }
1391
 
1395
  </ul>
1396
 
1397
  <p id="post-search" class="search-box">
1398
+ <input type="text" class="search-input" id="post-search-input" name="usersearch" value="<?php echo esc_attr($wp_user_search->search_term); ?>" />
1399
  <input type="submit" value="<?php _e( 'Search Users' ); ?>" class="button" />
1400
  </p>
1401
 
1428
  wp_print_scripts('admin-forms');
1429
  ?>
1430
  <div class="alignleft actions">
 
1431
  <?php _e("Users per page", $cimy_uef_domain); ?>
1432
  <select name="cimy_uef_users_per_page">
1433
  <?php
1444
  ?>
1445
  </select>
1446
  <input class="button" type="submit" name="submit" value="<?php _e("Apply"); ?>" />
 
1447
  </div>
1448
  </div>
1449
 
1506
 
1507
  if (!empty($_POST["ef_search"][$name])) {
1508
  if ($type == "dropdown-multi")
1509
+ $search_value = esc_attr(stripslashes(implode(",", $_POST["ef_search"][$name])));
1510
  else
1511
+ $search_value = esc_attr(stripslashes($_POST["ef_search"][$name]));
1512
  }
1513
 
1514
  $thead_str.= "<th scope=\"col\" class=\"manage-column\" style=\"\">";
1574
 
1575
  foreach ($wp_user_search->get_results() as $userid) {
1576
  $user_object = new WP_User($userid);
1577
+
1578
+ $roles = $user_object->roles;
1579
+ $role = array_shift($roles);
1580
  $email = $user_object->user_email;
1581
  $url = $user_object->user_url;
1582
  $short_url = str_replace('http://', '', $url);
1589
  $short_url = substr($short_url, 0, 32).'...';
1590
 
1591
  $style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
1592
+ $numposts = count_user_posts($user_object->ID);
1593
 
1594
  if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "'>$numposts</a>";
1595
  echo "
1606
  if ($current_user->ID == $user_object->ID) {
1607
  $edit = 'profile.php';
1608
  } else {
1609
+ $edit = esc_url( add_query_arg( 'wp_http_referer', urlencode( esc_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) );
1610
  }
1611
  $edit = "<a href=\"$edit\">$user_object->user_login</a>";
1612
  } else {
1626
  }
1627
 
1628
  if (!in_array("role", $options['aue_hidden_fields'])) {
1629
+ $role_name = translate_user_role($wp_roles->role_names[$role]);
 
 
1630
 
1631
  echo "<td class=\"role column-role\">";
1632
  echo $role_name;
1669
  foreach ($ef_db as $d_field) {
1670
  if ($d_field['FIELD_ID'] == $field_id) {
1671
  $field = cimy_uef_sanitize_content($d_field['VALUE']);
1672
+ //$field = esc_attr($d_field['VALUE']);
1673
  }
1674
  }
1675
 
1792
  $store_rule = $wpdb->escape(serialize($data['store_rule']));
1793
  $field_order = $wpdb->escape($data['field_order']);
1794
  $num_fields = $wpdb->escape($data['num_fields']);
1795
+
1796
  if ($action == "add")
1797
  $sql = "INSERT INTO ".$table." ";
1798
  else if ($action == "edit")
cimy_uef_db.php CHANGED
@@ -197,8 +197,42 @@ function cimy_plugin_install () {
197
  }
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  function cimy_manage_db($command) {
201
- global $wpdb, $wpdb_data_table, $wpdb_wp_fields_table, $wpdb_fields_table, $cimy_uef_options, $cimy_uef_version, $is_mu, $cimy_uef_domain;
202
 
203
  if (!cimy_check_admin('activate_plugins'))
204
  return;
@@ -231,7 +265,7 @@ function cimy_manage_db($command) {
231
  break;
232
 
233
  case 'drop_options':
234
- if ($is_mu)
235
  delete_site_option($cimy_uef_options);
236
  else
237
  delete_option($cimy_uef_options);
@@ -379,9 +413,9 @@ function cimy_insert_ExtraFields_if_not_exist($user_id, $field_id) {
379
  }
380
 
381
  function cimy_get_options() {
382
- global $is_mu, $cimy_uef_options, $cimy_uef_plugins_dir;
383
 
384
- if (($is_mu) && ($cimy_uef_plugins_dir == "mu-plugins"))
385
  $options = get_site_option($cimy_uef_options);
386
  else
387
  $options = get_option($cimy_uef_options);
@@ -390,12 +424,24 @@ function cimy_get_options() {
390
  }
391
 
392
  function cimy_set_options($options) {
393
- global $is_mu, $cimy_uef_options, $cimy_uef_options_descr, $cimy_uef_plugins_dir;
394
 
395
- if (($is_mu) && ($cimy_uef_plugins_dir == "mu-plugins"))
396
  update_site_option($cimy_uef_options, $options);
397
  else
398
  update_option($cimy_uef_options, $options, $cimy_uef_options_descr, "no");
399
  }
400
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  ?>
197
  }
198
  }
199
 
200
+ function cimy_force_signup_table_creation() {
201
+ global $wpdb;
202
+ $charset_collate = "";
203
+
204
+ // try to get proper charset and collate
205
+ if ( $wpdb->supports_collation() ) {
206
+ if ( ! empty($wpdb->charset) )
207
+ $charset_collate = " DEFAULT CHARACTER SET $wpdb->charset";
208
+ if ( ! empty($wpdb->collate) )
209
+ $charset_collate .= " COLLATE $wpdb->collate";
210
+ }
211
+
212
+ if ($wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."signups'") != $wpdb->prefix."signups") {
213
+
214
+ $sql = "CREATE TABLE ".$wpdb->prefix."signups (
215
+ domain varchar(200) NOT NULL default '',
216
+ path varchar(100) NOT NULL default '',
217
+ title longtext NOT NULL,
218
+ user_login varchar(60) NOT NULL default '',
219
+ user_email varchar(100) NOT NULL default '',
220
+ registered datetime NOT NULL default '0000-00-00 00:00:00',
221
+ activated datetime NOT NULL default '0000-00-00 00:00:00',
222
+ active tinyint(1) NOT NULL default '0',
223
+ activation_key varchar(50) NOT NULL default '',
224
+ meta longtext,
225
+ KEY activation_key (activation_key),
226
+ KEY domain (domain)
227
+ )".$charset_collate.";";
228
+
229
+ require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
230
+ dbDelta($sql);
231
+ }
232
+ }
233
+
234
  function cimy_manage_db($command) {
235
+ global $wpdb, $wpdb_data_table, $wpdb_wp_fields_table, $wpdb_fields_table, $cimy_uef_options, $cimy_uef_version, $cimy_uef_domain;
236
 
237
  if (!cimy_check_admin('activate_plugins'))
238
  return;
265
  break;
266
 
267
  case 'drop_options':
268
+ if (is_multisite())
269
  delete_site_option($cimy_uef_options);
270
  else
271
  delete_option($cimy_uef_options);
413
  }
414
 
415
  function cimy_get_options() {
416
+ global $cimy_uef_options, $cimy_uef_plugins_dir;
417
 
418
+ if ((is_multisite()) && ($cimy_uef_plugins_dir == "mu-plugins"))
419
  $options = get_site_option($cimy_uef_options);
420
  else
421
  $options = get_option($cimy_uef_options);
424
  }
425
 
426
  function cimy_set_options($options) {
427
+ global $cimy_uef_options, $cimy_uef_options_descr, $cimy_uef_plugins_dir;
428
 
429
+ if ((is_multisite()) && ($cimy_uef_plugins_dir == "mu-plugins"))
430
  update_site_option($cimy_uef_options, $options);
431
  else
432
  update_option($cimy_uef_options, $options, $cimy_uef_options_descr, "no");
433
  }
434
 
435
+ function cimy_uef_get_meta_from_user_login($user_login) {
436
+ global $wpdb;
437
+
438
+ return $wpdb->get_row($wpdb->prepare("SELECT user_login, user_email, meta FROM ".$wpdb->prefix."signups WHERE user_login = %s AND active = %d", $user_login, 0), ARRAY_A);
439
+ }
440
+
441
+ function cimy_uef_get_meta_from_url($domain, $path) {
442
+ global $wpdb;
443
+
444
+ return $wpdb->get_row($wpdb->prepare("SELECT user_login, user_email, meta FROM ".$wpdb->prefix."signups WHERE domain = %s AND path = %s AND active = %d", $domain, $path, 0), ARRAY_A );
445
+ }
446
+
447
  ?>
cimy_uef_email_handler.php ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !function_exists('wp_new_user_notification') ) :
4
+ /**
5
+ * Notify the blog admin of a new user, normally via email.
6
+ *
7
+ * @param int $user_id User ID
8
+ * @param string $plaintext_pass Optional. The user's plaintext password
9
+ */
10
+ function wp_new_user_notification($user_id, $plaintext_pass = '') {
11
+ if (isset($_POST["cimy_uef_wp_PASSWORD"]))
12
+ delete_usermeta($user_id, 'default_password_nag');
13
+
14
+ if (!is_multisite()) {
15
+ $options = cimy_get_options();
16
+
17
+ if (!$options["confirm_email"])
18
+ wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"]);
19
+ // if confirmation email is enabled delete the default_password_nag but checks first if has not been done on top of this function!
20
+ else if (!isset($_POST["cimy_uef_wp_PASSWORD"]))
21
+ delete_usermeta($user_id, 'default_password_nag');
22
+ }
23
+ else
24
+ wp_new_user_notification_original($user_id, $plaintext_pass, $options["mail_include_fields"]);
25
+ }
26
+ endif;
27
+
28
+ function wp_new_user_notification_original($user_id, $plaintext_pass = '', $include_fields = false) {
29
+ $user = new WP_User($user_id);
30
+
31
+ $user_login = stripslashes($user->user_login);
32
+ $user_email = stripslashes($user->user_email);
33
+
34
+ // The blogname option is escaped with esc_html on the way into the database in sanitize_option
35
+ // we want to reverse this for the plain text arena of emails.
36
+ $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
37
+
38
+ $message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
39
+ $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
40
+ $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
41
+
42
+ if ($include_fields)
43
+ $message .= cimy_uef_mail_fields($user);
44
+
45
+ @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
46
+
47
+ if ( empty($plaintext_pass) )
48
+ return;
49
+
50
+ $message = sprintf(__('Username: %s'), $user_login) . "\r\n";
51
+ $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
52
+
53
+ if ($include_fields)
54
+ $message .= cimy_uef_mail_fields($user);
55
+ $message .= wp_login_url() . "\r\n";
56
+
57
+ wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);
58
+ }
59
+
60
+ function cimy_uef_mail_fields($user = false, $activation_data = false) {
61
+ global $wp_hidden_fields, $cimy_uef_domain, $fields_name_prefix, $wp_fields_name_prefix;
62
+ $message = "";
63
+ $meta = false;
64
+
65
+ if ((empty($user)) && (empty($activation_data)))
66
+ return $message;
67
+
68
+ if (empty($user)) {
69
+ $user_login = $activation_data["user_login"];
70
+ // $user_email = $activation_data["user_email"];
71
+ if (!is_array($activation_data["meta"]))
72
+ $meta = unserialize($activation_data["meta"]);
73
+ else
74
+ $meta = $activation_data["meta"];
75
+
76
+ // neet to do it here, otherwise I pick up main options instead of blog's ones
77
+ cimy_switch_to_blog($meta);
78
+ $options = cimy_get_options();
79
+ restore_current_blog();
80
+
81
+ if (!$options["mail_include_fields"])
82
+ return $message;
83
+
84
+ $user = new WP_User($user_login);
85
+ }
86
+
87
+ if (empty($meta)) {
88
+ // normal fields
89
+ foreach ($wp_hidden_fields as $field)
90
+ if ((!empty($user->{$field["post_name"]})) && ($field["type"] != "password"))
91
+ $message.= sprintf(__('%s: %s', $cimy_uef_domain), $field["label"], $user->{$field["post_name"]}) . "\r\n";
92
+ }
93
+ else {
94
+ $fields = get_cimyFields(true);
95
+ foreach ($fields as $field) {
96
+ if ((!empty($meta[$wp_fields_name_prefix.$field["NAME"]])) && ($field["TYPE"] != "password"))
97
+ $message.= sprintf(__('%s: %s', $cimy_uef_domain), $field["LABEL"], $meta[$wp_fields_name_prefix.$field["NAME"]]) . "\r\n";
98
+ }
99
+ }
100
+
101
+ $message.= "\r\n";
102
+
103
+ // extra fields;
104
+ if (empty($meta)) {
105
+ $ef_data = get_cimyFieldValue($user->ID, false);
106
+
107
+ foreach ($ef_data as $field)
108
+ if (!empty($field["VALUE"]))
109
+ $message.= sprintf(__('%s: %s', $cimy_uef_domain), $field["LABEL"], $field["VALUE"]) . "\r\n";
110
+ }
111
+ else {
112
+ $extra_fields = get_cimyFields(false, true);
113
+ foreach ($extra_fields as $field) {
114
+ if (!empty($meta[$fields_name_prefix.$field["NAME"]]))
115
+ $message.= sprintf(__('%s: %s', $cimy_uef_domain), $field["LABEL"], $meta[$fields_name_prefix.$field["NAME"]]) . "\r\n";
116
+ }
117
+ }
118
+
119
+ return $message;
120
+ }
121
+
122
+ function cimy_uef_welcome_blog_to_user($welcome_email, $blog_id, $user_id, $password, $title, $meta) {
123
+ $welcome_email = cimy_uef_welcome_user_to_user($welcome_email, $user_id, $password, $meta);
124
+
125
+ return $welcome_email;
126
+ }
127
+
128
+ function cimy_uef_welcome_user_to_user($welcome_email, $user_id, $password, $meta) {
129
+ $activation_data = array();
130
+ // I know is a small lie, but it works!
131
+ $activation_data["user_login"] = $user_id;
132
+ $activation_data["meta"] = $meta;
133
+ $welcome_email.= "\r\n\r\n".cimy_uef_mail_fields(false, $activation_data);
134
+
135
+ return $welcome_email;
136
+ }
137
+
138
+ function cimy_uef_welcome_blog_to_admin($msg) {
139
+ $lines = explode("\n", $msg);
140
+ $second_line = explode("/", $lines[1]);
141
+ $path = "";
142
+ $domain = $second_line[2];
143
+ $i = 3;
144
+
145
+ while (isset($second_line[$i])) {
146
+ $path.= "/".$second_line[$i];
147
+ $i++;
148
+ }
149
+
150
+ if (substr($path, -1) != "/")
151
+ $path.= "/";
152
+
153
+ $res = cimy_uef_get_meta_from_url($domain, $path);
154
+ $msg.= "\r\n\r\n".cimy_uef_mail_fields(false, $res);
155
+
156
+ return $msg;
157
+ }
158
+
159
+ function cimy_uef_welcome_user_to_admin($msg) {
160
+ $lines = explode("\n", $msg);
161
+ $first_line = explode(":", $lines[0]);
162
+ $user_login = trim($first_line[1]);
163
+
164
+ $res = cimy_uef_get_meta_from_user_login($user_login);
165
+ $msg.= "\r\n\r\n".cimy_uef_mail_fields(false, $res);
166
+
167
+ return $msg;
168
+ }
169
+
170
+ function cimy_signup_user_notification($user, $user_email, $key, $meta = '') {
171
+ global $cuef_plugin_path;
172
+
173
+ if ( !apply_filters('wpmu_signup_user_notification', $user, $user_email, $key, $meta) )
174
+ return false;
175
+
176
+ // Send email with activation link.
177
+ $admin_email = get_site_option( 'admin_email' );
178
+ if ( $admin_email == '' )
179
+ $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
180
+ $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
181
+ $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
182
+ $message = sprintf( apply_filters( 'wpmu_signup_user_notification_email', __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n" ) ), site_url( "wp-login.php?cimy_key=$key" ), $key );
183
+ // TODO: Don't hard code activation link.
184
+ $subject = sprintf( __( apply_filters( 'wpmu_signup_user_notification_subject', '[%1$s] Activate %2$s' ) ), $from_name, $user);
185
+ wp_mail($user_email, $subject, $message, $message_headers);
186
+ return true;
187
+ }
188
+
189
+ function cimy_uef_activate($message) {
190
+ global $wpdb;
191
+ if (isset($_GET["cimy_key"])) {
192
+ $result = cimy_uef_activate_signup($_GET["cimy_key"]);
193
+
194
+ if ( is_wp_error($result) ) {
195
+ if ( 'already_active' == $result->get_error_code()) {
196
+ $signup = $result->get_error_data();
197
+ $message = '<p class="message"><strong>'.__('Your account is now active!').'</strong><br />';
198
+ $message.= sprintf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a></p>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword' ) );
199
+ } else {
200
+ $message = '<p class="message"><strong>'.__('An error occurred during the activation').'</strong><br />';
201
+ $message.= $result->get_error_message().'</p>';
202
+ }
203
+ } else {
204
+ extract($result);
205
+ $user = new WP_User( (int) $user_id);
206
+ $message = '<p class="message"><strong>'.__('Your account is now active!').'</strong><br />'.__('Username:').' '.$user->user_login.'<br />'.__('Password:').' '.$password.'</p>';
207
+ }
208
+ }
209
+ return $message;
210
+ }
211
+
212
+ function cimy_uef_activate_signup($key) {
213
+ global $wpdb, $current_site;
214
+
215
+ require_once( ABSPATH . WPINC . '/registration.php');
216
+ $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."signups WHERE activation_key = %s", $key) );
217
+
218
+ if ( empty($signup) )
219
+ return new WP_Error('invalid_key', __('Invalid activation key.'));
220
+
221
+ if ( $signup->active )
222
+ return new WP_Error('already_active', __('The site is already active.'), $signup);
223
+
224
+ $meta = unserialize($signup->meta);
225
+ $user_login = $wpdb->escape($signup->user_login);
226
+ $user_email = $wpdb->escape($signup->user_email);
227
+
228
+ if (!empty($meta["cimy_uef_wp_PASSWORD"]))
229
+ $password = $meta["cimy_uef_wp_PASSWORD"];
230
+ else
231
+ $password = wp_generate_password();
232
+
233
+ $user_id = username_exists($user_login);
234
+
235
+ if ( ! $user_id )
236
+ $user_id = wp_create_user( $user_login, $password, $user_email );
237
+ else
238
+ $user_already_exists = true;
239
+
240
+ if ( ! $user_id )
241
+ return new WP_Error('create_user', __('Could not create user'), $signup);
242
+ else
243
+ cimy_register_user_extra_fields($user_id, $password, $meta);
244
+
245
+ if ((empty($meta["cimy_uef_wp_PASSWORD"])) && ($user_already_exists))
246
+ update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag.
247
+
248
+ $now = current_time('mysql', true);
249
+
250
+ $wpdb->update( $wpdb->prefix."signups", array('active' => 1, 'activated' => $now), array('activation_key' => $key) );
251
+
252
+ if ( isset( $user_already_exists ) )
253
+ return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
254
+
255
+ wp_new_user_notification_original($user_id, $password);
256
+ return array('user_id' => $user_id, 'password' => $password, 'meta' => $meta);
257
+ }
258
+
259
+ function cimy_check_user_on_signups($errors, $user_name, $user_email) {
260
+ global $wpdb;
261
+
262
+ // Has someone already signed up for this username?
263
+ $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."signups WHERE user_login = %s", $user_name) );
264
+ if ( $signup != null ) {
265
+ $registered_at = mysql2date('U', $signup->registered);
266
+ $now = current_time( 'timestamp', true );
267
+ $diff = $now - $registered_at;
268
+ // If registered more than two days ago, cancel registration and let this signup go through.
269
+ if ( $diff > 172800 )
270
+ $wpdb->query( $wpdb->prepare("DELETE FROM ".$wpdb->prefix."signups WHERE user_login = %s", $user_name) );
271
+ else
272
+ $errors->add('user_name', __('That username is currently reserved but may be available in a couple of days.'));
273
+
274
+ if ( $signup->active == 0 && $signup->user_email == $user_email )
275
+ $errors->add('user_email_used', __('username and email used'));
276
+ }
277
+
278
+ $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."signups WHERE user_email = %s", $user_email) );
279
+ if ( $signup != null ) {
280
+ $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered);
281
+ // If registered more than two days ago, cancel registration and let this signup go through.
282
+ if ( $diff > 172800 )
283
+ $wpdb->query( $wpdb->prepare("DELETE FROM ".$wpdb->prefix."signups WHERE user_email = %s", $user_email) );
284
+ else
285
+ $errors->add('user_email', __('That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing.'));
286
+ }
287
+
288
+ return $errors;
289
+ }
290
+ ?>
cimy_uef_functions.php CHANGED
@@ -393,10 +393,10 @@ function cimy_uef_sanitize_content($content, $override_allowed_tags=null) {
393
  }
394
 
395
  function cimy_check_admin($permission) {
396
- global $is_mu, $cimy_uef_plugins_dir;
397
 
398
- if (($is_mu) && ($cimy_uef_plugins_dir == "mu-plugins"))
399
- return is_site_admin();
400
  else
401
  return current_user_can($permission);
402
 
@@ -412,7 +412,7 @@ function cimy_fieldsetOptions($selected=0, $order="") {
412
  $options = cimy_get_options();
413
 
414
  $i = 0;
415
- $html = "<select name=\"fieldset".$order."\">\n";
416
 
417
  if ($options['fieldset_title'] == "") {
418
  $html.= "\t<option value=\"$i\" selected=\"selected\">".__("no fieldset", $cimy_uef_domain)."</option>\n";
@@ -436,4 +436,39 @@ function cimy_fieldsetOptions($selected=0, $order="") {
436
  return $html;
437
  }
438
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  ?>
393
  }
394
 
395
  function cimy_check_admin($permission) {
396
+ global $cimy_uef_plugins_dir;
397
 
398
+ if ((is_multisite()) && ($cimy_uef_plugins_dir == "mu-plugins"))
399
+ return is_super_admin();
400
  else
401
  return current_user_can($permission);
402
 
412
  $options = cimy_get_options();
413
 
414
  $i = 0;
415
+ $html = "<select name=\"fieldset[".$order."]\">\n";
416
 
417
  if ($options['fieldset_title'] == "") {
418
  $html.= "\t<option value=\"$i\" selected=\"selected\">".__("no fieldset", $cimy_uef_domain)."</option>\n";
436
  return $html;
437
  }
438
 
439
+ function cimy_switch_to_blog($meta=array()) {
440
+ global $cimy_uef_plugins_dir;
441
+
442
+ if ((is_multisite()) && ($cimy_uef_plugins_dir == "plugins")) {
443
+ if (isset($meta["blog_id"]))
444
+ $mu_blog_id = intval($meta["blog_id"]);
445
+ else if (isset($_GET["blog_id"]))
446
+ $mu_blog_id = intval($_GET["blog_id"]);
447
+ else if (isset($_POST["blog_id"]))
448
+ $mu_blog_id = intval($_POST["blog_id"]);
449
+ else
450
+ $mu_blog_id = 1;
451
+
452
+ if (cimy_uef_mu_blog_exists($mu_blog_id)) {
453
+ if (switch_to_blog($mu_blog_id))
454
+ cimy_uef_set_tables();
455
+ else
456
+ $mu_blog_id = 1;
457
+ }
458
+ else
459
+ $mu_blog_id = 1;
460
+ }
461
+ }
462
+
463
+ function cimy_switch_current_blog($hidden_field=false) {
464
+ global $switched, $blog_id;
465
+
466
+ if (isset($switched)) {
467
+ if ($hidden_field)
468
+ echo "\t<input type=\"hidden\" name=\"blog_id\" value=\"".$blog_id."\" />\n";
469
+
470
+ //restore_current_blog();
471
+ }
472
+ }
473
+
474
  ?>
cimy_uef_init_mce.php CHANGED
@@ -19,7 +19,7 @@ if ($cimy_uef_register_page) {
19
  try{convertEntities(userSettings);}catch(e){};
20
  /* ]]> */
21
  </script>
22
- <script type='text/javascript' src='http://localhost/wordpress27/wp-admin/js/common.js?ver=20081126'></script>
23
  <?php
24
  } else
25
  $userid = $get_user_id;
@@ -79,7 +79,7 @@ if ($cimy_uef_register_page) {
79
  tinyMCE.init({
80
  mode : "exact",
81
  theme : "'.$theme.'",
82
- elements : "'.attribute_escape($tiny_mce_objects).'",
83
  theme_advanced_toolbar_location : "top",
84
  theme_advanced_toolbar_align : "left",
85
  theme_advanced_statusbar_location : "bottom",
19
  try{convertEntities(userSettings);}catch(e){};
20
  /* ]]> */
21
  </script>
22
+ <!-- <script type='text/javascript' src='http://localhost/wordpress27/wp-admin/js/common.js?ver=20081126'></script> -->
23
  <?php
24
  } else
25
  $userid = $get_user_id;
79
  tinyMCE.init({
80
  mode : "exact",
81
  theme : "'.$theme.'",
82
+ elements : "'.esc_attr($tiny_mce_objects).'",
83
  theme_advanced_toolbar_location : "top",
84
  theme_advanced_toolbar_align : "left",
85
  theme_advanced_statusbar_location : "bottom",
cimy_uef_init_strength_meter.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>wp-admin/js/password-strength-meter.dev.js?ver=20070405'></script>
2
+ <script type="text/javascript">
3
+ function check_pass_strength() {
4
+ var pass1 = jQuery('#<?php echo $pass1_id; ?>').val(), pass2 = jQuery('#<?php echo $pass2_id; ?>').val(), user = jQuery('#<?php if (is_multisite()) echo "user_name"; else echo "user_login"; ?>').val(), strength;
5
+
6
+ jQuery('#pass-strength-result').removeClass('short bad good strong');
7
+ if ( ! pass1 ) {
8
+ jQuery('#pass-strength-result').html( pwsL10n.empty );
9
+ return;
10
+ }
11
+
12
+ strength = passwordStrength(pass1, user, pass2);
13
+
14
+ switch ( strength ) {
15
+ case 2:
16
+ jQuery('#pass-strength-result').addClass('bad').html( pwsL10n['bad'] );
17
+ break;
18
+ case 3:
19
+ jQuery('#pass-strength-result').addClass('good').html( pwsL10n['good'] );
20
+ break;
21
+ case 4:
22
+ jQuery('#pass-strength-result').addClass('strong').html( pwsL10n['strong'] );
23
+ break;
24
+ case 5:
25
+ jQuery('#pass-strength-result').addClass('short').html( pwsL10n['mismatch'] );
26
+ break;
27
+ default:
28
+ jQuery('#pass-strength-result').addClass('short').html( pwsL10n['short'] );
29
+ }
30
+ }
31
+
32
+ jQuery(document).ready( function() {
33
+ jQuery('#<?php echo $pass1_id; ?>,').val('').keyup( check_pass_strength );
34
+ jQuery('#<?php echo $pass2_id; ?>,').val('').keyup( check_pass_strength );
35
+ jQuery('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
36
+ check_pass_strength();
37
+ });
38
+ </script>
39
+
40
+ <script type='text/javascript'>
41
+ /* <![CDATA[ */
42
+ var commonL10n = {
43
+ warnDelete: "You are about to permanently delete the selected items.\n \'Cancel\' to stop, \'OK\' to delete."
44
+ };
45
+ try{convertEntities(commonL10n);}catch(e){};
46
+ var pwsL10n = {
47
+ empty: "Strength indicator",
48
+ short: "Very weak",
49
+ bad: "Weak",
50
+ good: "Medium",
51
+ strong: "Strong",
52
+ mismatch: "Mismatch"
53
+ };
54
+ try{convertEntities(pwsL10n);}catch(e){};
55
+ /* ]]> */
56
+ </script>
cimy_uef_options.php CHANGED
@@ -27,6 +27,12 @@ function cimy_save_options() {
27
  $options['fieldset_title'] = stripslashes($_POST['fieldset_title']);
28
  $options['fieldset_title'] = substr($options['fieldset_title'], 0, $max_length_fieldset_value);
29
 
 
 
 
 
 
 
30
  if (isset($_POST['db_wp_fields_check'])) {
31
  switch ($_POST['db_wp_fields']) {
32
  case 'empty':
@@ -109,7 +115,21 @@ function cimy_save_options() {
109
 
110
  $tot_wp_hidden_fields = count($old_wp_hidden_fields);
111
  $action = "add";
112
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  if (!isset($results['empty_wp_fields'])) {
114
  if (isset($_POST['show_wp_password'])) {
115
  array_push($options['wp_hidden_fields'], 'password');
@@ -122,7 +142,24 @@ function cimy_save_options() {
122
 
123
  cimy_save_field($action, $wpdb_wp_fields_table, $data);
124
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
 
 
126
 
127
  if (isset($_POST['show_wp_firstname'])) {
128
  array_push($options['wp_hidden_fields'], 'firstname');
@@ -254,8 +291,8 @@ function cimy_save_options() {
254
  foreach ($all_wp_fields as $wp_field) {
255
  $f_name = strtolower($wp_field['NAME']);
256
  $f_order = intval($wp_field['F_ORDER']);
257
-
258
- if (!isset($_POST['show_wp_'.$f_name])) {
259
  if (in_array($f_name, $old_wp_hidden_fields)) {
260
  if ($k > (-1)) {
261
  $sql.= " OR ";
@@ -314,7 +351,7 @@ function cimy_show_options_notembedded() {
314
  }
315
 
316
  function cimy_show_options($results, $embedded) {
317
- global $wpdb, $wpdb_wp_fields_table, $wpdb_fields_table, $wpdb_data_table, $max_length_fieldset_value, $cimy_uef_name, $cimy_uef_url, $cimy_uef_version, $cimy_uef_domain, $cimy_top_menu, $max_length_extra_fields_title, $cuef_upload_path;
318
 
319
  if (!cimy_check_admin('manage_options'))
320
  return;
@@ -324,9 +361,23 @@ function cimy_show_options($results, $embedded) {
324
  $results = cimy_save_options();
325
 
326
  $options = cimy_get_options();
 
 
327
 
328
  if ($options) {
329
- $options['fieldset_title'] = attribute_escape($options['fieldset_title']);
 
 
 
 
 
 
 
 
 
 
 
 
330
 
331
  in_array('username', $options['aue_hidden_fields']) ? $aue_hide_username = ' checked="checked"' : $aue_hide_username = '';
332
  in_array('name', $options['aue_hidden_fields']) ? $aue_hide_name = ' checked="checked"' : $aue_hide_name = '';
@@ -336,6 +387,9 @@ function cimy_show_options($results, $embedded) {
336
  in_array('role', $options['aue_hidden_fields']) ? $aue_hide_role = ' checked="checked"' : $aue_hide_role = '';
337
 
338
  in_array('password', $options['wp_hidden_fields']) ? $show_wp_password = ' checked="checked"' : $show_wp_password = '';
 
 
 
339
  in_array('firstname', $options['wp_hidden_fields']) ? $show_wp_firstname = ' checked="checked"' : $show_wp_firstname = '';
340
  in_array('lastname', $options['wp_hidden_fields']) ? $show_wp_lastname = ' checked="checked"' : $show_wp_lastname = '';
341
  in_array('nickname', $options['wp_hidden_fields']) ? $show_wp_nickname = ' checked="checked"' : $show_wp_nickname = '';
@@ -350,7 +404,12 @@ function cimy_show_options($results, $embedded) {
350
  else {
351
  $db_options = false;
352
  $options['fieldset_title'] = "";
353
-
 
 
 
 
 
354
  $aue_hide_username = '';
355
  $aue_hide_name = '';
356
  $aue_hide_email = '';
@@ -359,6 +418,8 @@ function cimy_show_options($results, $embedded) {
359
  $aue_hide_role = '';
360
 
361
  $show_wp_password = '';
 
 
362
  $show_wp_firstname = '';
363
  $show_wp_secondname = '';
364
  $show_wp_nickname = '';
@@ -412,7 +473,23 @@ function cimy_show_options($results, $embedded) {
412
  if (!isset($cimy_top_menu)) {
413
  ?> - <a href="#addfield"><?php _e("Add a new Field", $cimy_uef_domain); ?></a> - <a href="#extrafields"><?php _e("Extra Fields", $cimy_uef_domain); ?></a><?php
414
  }
415
- ?></h2><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
  // print successes if there are some
418
  if (count($results) > 0) {
@@ -430,7 +507,7 @@ function cimy_show_options($results, $embedded) {
430
  <?php
431
  }
432
 
433
- ?><form method="post" action="#options">
434
  <p class="submit" style="border-width: 0px;"><input class="button-primary" type="submit" name="Submit" value="<?php _e('Save Changes') ?>" /></p>
435
  <h3><?php _e("General"); ?></h3>
436
  <table class="form-table">
@@ -468,6 +545,60 @@ function cimy_show_options($results, $embedded) {
468
  ?>
469
  </td>
470
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  </table>
472
  <br />
473
  <h3><?php _e("Database", $cimy_uef_domain); ?></h3>
@@ -605,6 +736,14 @@ function cimy_show_options($results, $embedded) {
605
  <th scope="row" width="40%"><input type="checkbox" name="show_wp_password" value="1"<?php echo $show_wp_password.$dis_wp_fields; ?> /> <?php _e("Show password", $cimy_uef_domain); ?></th>
606
  <td width="60%"></td>
607
  </tr>
 
 
 
 
 
 
 
 
608
  <tr>
609
  <th><input type="checkbox" name="show_wp_firstname" value="1"<?php echo $show_wp_firstname.$dis_wp_fields; ?> /> <?php _e("Show first name", $cimy_uef_domain); ?></th>
610
  <td></td>
27
  $options['fieldset_title'] = stripslashes($_POST['fieldset_title']);
28
  $options['fieldset_title'] = substr($options['fieldset_title'], 0, $max_length_fieldset_value);
29
 
30
+ $old_reg_log = $options['registration-logo'];
31
+ $registration_logo = cimy_manage_upload("registration_logo", "", array(), empty($old_reg_log) ? false : basename($old_reg_log), isset($_POST['registration_logo_del']), "registration-logo");
32
+ if ((!empty($registration_logo)) || (isset($_POST['registration_logo_del']))) {
33
+ $options['registration-logo'] = $registration_logo;
34
+ }
35
+
36
  if (isset($_POST['db_wp_fields_check'])) {
37
  switch ($_POST['db_wp_fields']) {
38
  case 'empty':
115
 
116
  $tot_wp_hidden_fields = count($old_wp_hidden_fields);
117
  $action = "add";
118
+
119
+ (isset($_POST['confirm_email'])) ? $options['confirm_email'] = true : $options['confirm_email'] = false;
120
+ if ($options['confirm_email'])
121
+ cimy_force_signup_table_creation();
122
+ (isset($_POST['mail_include_fields'])) ? $options['mail_include_fields'] = true : $options['mail_include_fields'] = false;
123
+ (isset($_POST['recaptcha'])) ? $options['recaptcha'] = true : $options['recaptcha'] = false;
124
+
125
+ if (isset($_POST['recaptcha_public_key'])) {
126
+ $options['recaptcha_public_key'] = trim($_POST['recaptcha_public_key']);
127
+ }
128
+
129
+ if (isset($_POST['recaptcha_private_key'])) {
130
+ $options['recaptcha_private_key'] = trim($_POST['recaptcha_private_key']);
131
+ }
132
+
133
  if (!isset($results['empty_wp_fields'])) {
134
  if (isset($_POST['show_wp_password'])) {
135
  array_push($options['wp_hidden_fields'], 'password');
142
 
143
  cimy_save_field($action, $wpdb_wp_fields_table, $data);
144
  }
145
+
146
+ if (isset($_POST['show_wp_password2'])) {
147
+ array_push($options['wp_hidden_fields'], 'password2');
148
+
149
+ if (!in_array("password2", $old_wp_hidden_fields)) {
150
+ $data = $wp_hidden_fields['password2'];
151
+
152
+ $data['num_fields'] = $tot_wp_hidden_fields;
153
+ $tot_wp_hidden_fields++;
154
+
155
+ cimy_save_field($action, $wpdb_wp_fields_table, $data);
156
+ }
157
+ }
158
+
159
+ (isset($_POST['show_wp_password_meter'])) ? $options['password_meter'] = true : $options['password_meter'] = false;
160
  }
161
+ else
162
+ $options['password_meter'] = false;
163
 
164
  if (isset($_POST['show_wp_firstname'])) {
165
  array_push($options['wp_hidden_fields'], 'firstname');
291
  foreach ($all_wp_fields as $wp_field) {
292
  $f_name = strtolower($wp_field['NAME']);
293
  $f_order = intval($wp_field['F_ORDER']);
294
+
295
+ if (!in_array($f_name, $options['wp_hidden_fields'])) {
296
  if (in_array($f_name, $old_wp_hidden_fields)) {
297
  if ($k > (-1)) {
298
  $sql.= " OR ";
351
  }
352
 
353
  function cimy_show_options($results, $embedded) {
354
+ global $wpdb, $wpdb_wp_fields_table, $wpdb_fields_table, $wpdb_data_table, $max_length_fieldset_value, $cimy_uef_name, $cimy_uef_url, $cimy_project_url, $cimy_uef_version, $cimy_uef_domain, $cimy_top_menu, $max_length_extra_fields_title, $cuef_upload_path;
355
 
356
  if (!cimy_check_admin('manage_options'))
357
  return;
361
  $results = cimy_save_options();
362
 
363
  $options = cimy_get_options();
364
+ wp_print_scripts("cimy_uef_upload_file");
365
+ $warning_msg = $wpdb->escape(__("Please upload an image with one of the following extensions", $cimy_uef_domain));
366
 
367
  if ($options) {
368
+ if ((!is_dir($cuef_upload_path)) && (is_writable(WP_CONTENT_DIR))) {
369
+ if (defined("FS_CHMOD_DIR"))
370
+ @mkdir($cuef_upload_path, FS_CHMOD_DIR);
371
+ else
372
+ @mkdir($cuef_upload_path, 0777);
373
+ }
374
+
375
+ $options['fieldset_title'] = esc_attr($options['fieldset_title']);
376
+ $options['mail_include_fields'] ? $mail_include_fields = ' checked="checked"' : $mail_include_fields = '';
377
+ $options['confirm_email'] ? $confirm_email = ' checked="checked"' : $confirm_email = '';
378
+ $options['recaptcha'] ? $recaptcha = ' checked="checked"' : $recaptcha = '';
379
+ isset($options['recaptcha_public_key']) ? $recaptcha_public_key = $options['recaptcha_public_key'] : $recaptcha_public_key = '';
380
+ isset($options['recaptcha_private_key']) ? $recaptcha_private_key = $options['recaptcha_private_key'] : $recaptcha_private_key = '';
381
 
382
  in_array('username', $options['aue_hidden_fields']) ? $aue_hide_username = ' checked="checked"' : $aue_hide_username = '';
383
  in_array('name', $options['aue_hidden_fields']) ? $aue_hide_name = ' checked="checked"' : $aue_hide_name = '';
387
  in_array('role', $options['aue_hidden_fields']) ? $aue_hide_role = ' checked="checked"' : $aue_hide_role = '';
388
 
389
  in_array('password', $options['wp_hidden_fields']) ? $show_wp_password = ' checked="checked"' : $show_wp_password = '';
390
+ in_array('password2', $options['wp_hidden_fields']) ? $show_wp_password2 = ' checked="checked"' : $show_wp_password2 = '';
391
+ $options['password_meter'] ? $show_wp_password_meter = ' checked="checked"' : $show_wp_password_meter = '';
392
+
393
  in_array('firstname', $options['wp_hidden_fields']) ? $show_wp_firstname = ' checked="checked"' : $show_wp_firstname = '';
394
  in_array('lastname', $options['wp_hidden_fields']) ? $show_wp_lastname = ' checked="checked"' : $show_wp_lastname = '';
395
  in_array('nickname', $options['wp_hidden_fields']) ? $show_wp_nickname = ' checked="checked"' : $show_wp_nickname = '';
404
  else {
405
  $db_options = false;
406
  $options['fieldset_title'] = "";
407
+ $mail_include_fields= '';
408
+ $confirm_email = '';
409
+ $recaptcha = '';
410
+ $recaptcha_public_key = '';
411
+ $recaptcha_private_key = '';
412
+
413
  $aue_hide_username = '';
414
  $aue_hide_name = '';
415
  $aue_hide_email = '';
418
  $aue_hide_role = '';
419
 
420
  $show_wp_password = '';
421
+ $show_wp_password2 = '';
422
+ $show_wp_password_meter = '';
423
  $show_wp_firstname = '';
424
  $show_wp_secondname = '';
425
  $show_wp_nickname = '';
473
  if (!isset($cimy_top_menu)) {
474
  ?> - <a href="#addfield"><?php _e("Add a new Field", $cimy_uef_domain); ?></a> - <a href="#extrafields"><?php _e("Extra Fields", $cimy_uef_domain); ?></a><?php
475
  }
476
+ ?></h2>
477
+ <table class="form-table">
478
+ <tr>
479
+ <th scope="row" width="40%">
480
+ <strong><a href="<?php echo $cimy_project_url; ?>"><?php _e("Support the Cimy Project", $cimy_uef_domain); ?></a></strong>
481
+ </th>
482
+ <td width="60%">
483
+ <form style="text-align: left;" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" type="hidden" value="_s-xclick" />
484
+ <input name="hosted_button_id" type="hidden" value="8774924" />
485
+ <input alt="PayPal - The safer, easier way to pay online." name="submit" src="https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif" type="image" />
486
+ <img src="https://www.paypal.com/it_IT/i/scr/pixel.gif" border="0" alt="" width="1" height="1" />
487
+ </form>
488
+ <?php _e("This plug-in is the results of hours of development to add new features, support new WordPress versions and fix bugs, please donate money if saved you from spending all these hours!", $cimy_uef_domain); ?>
489
+ </td>
490
+ </tr>
491
+ </table>
492
+ <?php
493
 
494
  // print successes if there are some
495
  if (count($results) > 0) {
507
  <?php
508
  }
509
 
510
+ ?><form method="post" action="#options" id="cimy_uef_options">
511
  <p class="submit" style="border-width: 0px;"><input class="button-primary" type="submit" name="Submit" value="<?php _e('Save Changes') ?>" /></p>
512
  <h3><?php _e("General"); ?></h3>
513
  <table class="form-table">
545
  ?>
546
  </td>
547
  </tr>
548
+ <tr>
549
+ <th scope="row">
550
+ <input type="checkbox" name="mail_include_fields" value="1"<?php echo $mail_include_fields; ?> />
551
+ <?php _e("Show all fields in the welcome email", $cimy_uef_domain); ?>
552
+ </th>
553
+ <td>
554
+ <?php
555
+ _e("the email sent to the admin and to the user upon registration will have all fields", $cimy_uef_domain);
556
+ ?>
557
+ </td>
558
+ </tr>
559
+ <?php if (!is_multisite()) { ?>
560
+ <tr>
561
+ <th scope="row">
562
+ <input type="checkbox" name="confirm_email" value="1"<?php echo $confirm_email; ?> />
563
+ <?php _e("Enable email confirmation", $cimy_uef_domain); ?>
564
+ </th>
565
+ <td>
566
+ <?php
567
+ _e("user that registers should confirm its email address via a link click", $cimy_uef_domain);
568
+ ?>
569
+ </td>
570
+ </tr>
571
+ <?php } ?>
572
+ <tr>
573
+ <th scope="row">
574
+ <input type="checkbox" name="recaptcha" value="1"<?php echo $recaptcha; ?> />
575
+ <?php _e('Enable <a href="http://www.google.com/recaptcha" target="_blank">reCAPTCHA</a>', $cimy_uef_domain); ?></a>
576
+ </th>
577
+ <td>
578
+ <?php
579
+ _e("Public KEY", $cimy_uef_domain);
580
+ ?>
581
+ <input type="text" name="recaptcha_public_key" value="<?php echo $recaptcha_public_key; ?>" size="40" /><br />
582
+ <?php
583
+ _e("Private KEY", $cimy_uef_domain);
584
+ ?>
585
+ <input type="text" name="recaptcha_private_key" value="<?php echo $recaptcha_private_key; ?>" size="40" />
586
+ </td>
587
+ </tr>
588
+ <?php if (!is_multisite()) { ?>
589
+ <tr>
590
+ <th scope="row"><?php _e("Change login/registration page logo", $cimy_uef_domain); ?></th>
591
+ <td>
592
+ <?php if (!empty($options["registration-logo"])) { ?><input type="hidden" name="registration_logo_oldfile" value="<?php echo basename($options["registration-logo"]); ?>" />
593
+ <?php echo basename($options["registration-logo"]).'<br />'; ?>
594
+ <input type="checkbox" name="registration_logo_del" value="1" />
595
+ <?php echo " ".__("Delete the picture", $cimy_uef_domain); ?><br /><br /><?php } ?>
596
+
597
+ <input type="file" id="registration_logo" name="registration_logo" onchange="uploadFile('cimy_uef_options', 'registration_logo', '<?php echo $warning_msg; ?>', Array('gif', 'png', 'jpg', 'jpeg', 'tiff'))" />
598
+ <?php _e("Maximum recommended logo width is 328px, but any height should work.", $cimy_uef_domain);?>
599
+ </td>
600
+ </tr>
601
+ <?php } ?>
602
  </table>
603
  <br />
604
  <h3><?php _e("Database", $cimy_uef_domain); ?></h3>
736
  <th scope="row" width="40%"><input type="checkbox" name="show_wp_password" value="1"<?php echo $show_wp_password.$dis_wp_fields; ?> /> <?php _e("Show password", $cimy_uef_domain); ?></th>
737
  <td width="60%"></td>
738
  </tr>
739
+ <tr>
740
+ <th>&nbsp;&nbsp;&nbsp;<input type="checkbox" name="show_wp_password2" value="1"<?php echo $show_wp_password2.$dis_wp_fields; ?> /> <?php _e("Show confirmation password", $cimy_uef_domain); ?></th>
741
+ <td></td>
742
+ </tr>
743
+ <tr>
744
+ <th>&nbsp;&nbsp;&nbsp;<input type="checkbox" name="show_wp_password_meter" value="1"<?php echo $show_wp_password_meter.$dis_wp_fields; ?> /> <?php _e("Show password strength meter", $cimy_uef_domain); ?></th>
745
+ <td></td>
746
+ </tr>
747
  <tr>
748
  <th><input type="checkbox" name="show_wp_firstname" value="1"<?php echo $show_wp_firstname.$dis_wp_fields; ?> /> <?php _e("Show first name", $cimy_uef_domain); ?></th>
749
  <td></td>
cimy_uef_profile.php