Import users from CSV with meta - Version 1.10.8

Version Description

  • New system for include addons
  • You can now import data from WooCommerce Membership thanks to Lukas from Kousekmusic.cz
  • Tested up to WordPress 4.9
Download this release

Release Info

Developer carazo
Plugin Icon 128x128 Import users from CSV with meta
Version 1.10.8
Comparing to
See all releases

Code changes from version 1.10.7.5 to 1.10.8

Files changed (3) hide show
  1. import-users-from-csv-with-meta.php +26 -29
  2. importer.php +3 -1
  3. readme.txt +8 -3
import-users-from-csv-with-meta.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Import users from CSV with meta
4
  Plugin URI: https://www.codection.com
5
  Description: This plugins allows to import users using CSV files to WP database automatically
6
- Version: 1.10.7.5
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
@@ -35,6 +35,24 @@ else
35
  acui_loader();
36
 
37
  function acui_loader(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  require_once( "importer.php" );
39
  }
40
 
@@ -114,6 +132,11 @@ function acui_delete_options(){
114
  }
115
  }
116
 
 
 
 
 
 
117
  function acui_menu() {
118
  add_submenu_page( 'tools.php', __( 'Insert users massively (CSV)', 'import-users-from-csv-with-meta' ), __( 'Import users from CSV', 'import-users-from-csv-with-meta' ), 'create_users', 'acui', 'acui_options' );
119
  }
@@ -252,13 +275,6 @@ function acui_admin_tabs( $current = 'homepage' ) {
252
  echo '</h2>';
253
  }
254
 
255
- /**
256
- * Handle file uploads
257
- *
258
- * @todo check file size
259
- *
260
- * @return none
261
- */
262
  function acui_fileupload_process( $form_data, $is_cron = false ) {
263
  if ( !$is_cron && ( ! isset( $_POST['acui-nonce'] ) || ! wp_verify_nonce( $_POST['acui-nonce'], 'acui-import' ) ) ){
264
  wp_die( 'Nonce problem' );
@@ -465,8 +481,7 @@ function acui_cron_process_auto_rename () {
465
  }
466
 
467
  function acui_extra_user_profile_fields( $user ) {
468
- global $acui_restricted_fields;
469
-
470
  $headers = get_option("acui_columns");
471
  if( is_array( $headers ) && !empty( $headers ) ):
472
  ?>
@@ -490,9 +505,8 @@ function acui_extra_user_profile_fields( $user ) {
490
  }
491
 
492
  function acui_save_extra_user_profile_fields( $user_id ){
493
- global $acui_restricted_fields;
494
-
495
  $headers = get_option("acui_columns");
 
496
 
497
  $post_filtered = filter_input_array( INPUT_POST );
498
 
@@ -616,23 +630,6 @@ function acui_bulk_delete_attachment(){
616
  }
617
  }
618
  }
619
-
620
- register_activation_hook( __FILE__,'acui_init' );
621
- register_deactivation_hook( __FILE__, 'acui_deactivate' );
622
- add_action( "plugins_loaded", "acui_init" );
623
- add_action( "admin_menu", "acui_menu" );
624
- add_filter( 'plugin_row_meta', 'acui_plugin_row_meta', 10, 2 );
625
- add_action( 'admin_init', 'acui_modify_user_edit_admin' );
626
- add_action( 'wp_ajax_acui_delete_attachment', 'acui_delete_attachment' );
627
- add_action( 'wp_ajax_acui_bulk_delete_attachment', 'acui_bulk_delete_attachment' );
628
- add_action( 'acui_cron_process', 'acui_cron_process' );
629
-
630
- if( get_option( 'acui_show_profile_fields' ) == true ){
631
- add_action( "show_user_profile", "acui_extra_user_profile_fields" );
632
- add_action( "edit_user_profile", "acui_extra_user_profile_fields" );
633
- add_action( "personal_options_update", "acui_save_extra_user_profile_fields" );
634
- add_action( "edit_user_profile_update", "acui_save_extra_user_profile_fields" );
635
- }
636
 
637
  // misc
638
  if (!function_exists('str_getcsv')) {
3
  Plugin Name: Import users from CSV with meta
4
  Plugin URI: https://www.codection.com
5
  Description: This plugins allows to import users using CSV files to WP database automatically
6
+ Version: 1.10.8
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
35
  acui_loader();
36
 
37
  function acui_loader(){
38
+ register_activation_hook( __FILE__,'acui_init' );
39
+ register_deactivation_hook( __FILE__, 'acui_deactivate' );
40
+ add_action( "plugins_loaded", "acui_init" );
41
+ add_action( "admin_menu", "acui_menu" );
42
+ add_filter( 'plugin_row_meta', 'acui_plugin_row_meta', 10, 2 );
43
+ add_action( 'admin_init', 'acui_modify_user_edit_admin' );
44
+ add_action( 'wp_ajax_acui_delete_attachment', 'acui_delete_attachment' );
45
+ add_action( 'wp_ajax_acui_bulk_delete_attachment', 'acui_bulk_delete_attachment' );
46
+ add_action( 'acui_cron_process', 'acui_cron_process' );
47
+
48
+ if( get_option( 'acui_show_profile_fields' ) == true ){
49
+ add_action( "show_user_profile", "acui_extra_user_profile_fields" );
50
+ add_action( "edit_user_profile", "acui_extra_user_profile_fields" );
51
+ add_action( "personal_options_update", "acui_save_extra_user_profile_fields" );
52
+ add_action( "edit_user_profile_update", "acui_save_extra_user_profile_fields" );
53
+ }
54
+
55
+ require_once( "addons/acui-woocommerce-membership.php" );
56
  require_once( "importer.php" );
57
  }
58
 
132
  }
133
  }
134
 
135
+ function acui_get_restricted_fields(){
136
+ global $acui_restricted_fields;
137
+ return apply_filters( 'acui_restricted_fields', $acui_restricted_fields );
138
+ }
139
+
140
  function acui_menu() {
141
  add_submenu_page( 'tools.php', __( 'Insert users massively (CSV)', 'import-users-from-csv-with-meta' ), __( 'Import users from CSV', 'import-users-from-csv-with-meta' ), 'create_users', 'acui', 'acui_options' );
142
  }
275
  echo '</h2>';
276
  }
277
 
 
 
 
 
 
 
 
278
  function acui_fileupload_process( $form_data, $is_cron = false ) {
279
  if ( !$is_cron && ( ! isset( $_POST['acui-nonce'] ) || ! wp_verify_nonce( $_POST['acui-nonce'], 'acui-import' ) ) ){
280
  wp_die( 'Nonce problem' );
481
  }
482
 
483
  function acui_extra_user_profile_fields( $user ) {
484
+ $acui_restricted_fields = acui_get_restricted_fields();
 
485
  $headers = get_option("acui_columns");
486
  if( is_array( $headers ) && !empty( $headers ) ):
487
  ?>
505
  }
506
 
507
  function acui_save_extra_user_profile_fields( $user_id ){
 
 
508
  $headers = get_option("acui_columns");
509
+ $acui_restricted_fields = acui_get_restricted_fields();
510
 
511
  $post_filtered = filter_input_array( INPUT_POST );
512
 
630
  }
631
  }
632
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
633
 
634
  // misc
635
  if (!function_exists('str_getcsv')) {
importer.php CHANGED
@@ -14,7 +14,7 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false
14
  global $wp_users_fields;
15
  global $wp_min_fields;
16
  global $acui_fields;
17
- global $acui_restricted_fields;
18
 
19
  if( is_plugin_active( 'wp-access-areas/wp-access-areas.php' ) ){
20
  $wpaa_labels = WPAA_AccessArea::get_available_userlabels();
@@ -1054,6 +1054,8 @@ function acui_options(){
1054
 
1055
  <?php endif; ?>
1056
 
 
 
1057
  <tr valign="top">
1058
  <th scope="row"><?php _e( "Important notice", 'import-users-from-csv-with-meta' ); ?></th>
1059
  <td><?php _e( "You can upload as many files as you want, but all must have the same columns. If you upload another file, the columns will change to the form of last file uploaded.", 'import-users-from-csv-with-meta' ); ?></td>
14
  global $wp_users_fields;
15
  global $wp_min_fields;
16
  global $acui_fields;
17
+ $acui_restricted_fields = acui_get_restricted_fields();
18
 
19
  if( is_plugin_active( 'wp-access-areas/wp-access-areas.php' ) ){
20
  $wpaa_labels = WPAA_AccessArea::get_available_userlabels();
1054
 
1055
  <?php endif; ?>
1056
 
1057
+ <?php do_action( 'acui_documentation_after_plugins_activated' ); ?>
1058
+
1059
  <tr valign="top">
1060
  <th scope="row"><?php _e( "Important notice", 'import-users-from-csv-with-meta' ); ?></th>
1061
  <td><?php _e( "You can upload as many files as you want, but all must have the same columns. If you upload another file, the columns will change to the form of last file uploaded.", 'import-users-from-csv-with-meta' ); ?></td>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: carazo, hornero
3
  Donate link: http://paypal.me/codection
4
  Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
5
  Requires at least: 3.4
6
- Tested up to: 4.8
7
- Stable tag: 1.10.7.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -70,6 +70,11 @@ Plugin will automatically detect:
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
73
  = 1.10.7.5 =
74
  * Bug solved in cron import, now mails not being sent to user who are being updated unless you activate those mails
75
 
@@ -565,4 +570,4 @@ Now going through the points above, you should now see a new&nbsp;_Import users
565
 
566
  If you get any error after following through the steps above please contact us through item support comments so we can get back to you with possible helps in installing the plugin and more.
567
 
568
- Please read documentation before start using this plugin.
3
  Donate link: http://paypal.me/codection
4
  Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
5
  Requires at least: 3.4
6
+ Tested up to: 4.9
7
+ Stable tag: 1.10.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.10.8 =
74
+ * New system for include addons
75
+ * You can now import data from WooCommerce Membership thanks to Lukas from Kousekmusic.cz
76
+ * Tested up to WordPress 4.9
77
+
78
  = 1.10.7.5 =
79
  * Bug solved in cron import, now mails not being sent to user who are being updated unless you activate those mails
80
 
570
 
571
  If you get any error after following through the steps above please contact us through item support comments so we can get back to you with possible helps in installing the plugin and more.
572
 
573
+ Please read documentation before start using this plugin.