Import users from CSV with meta - Version 1.17.4.1

Version Description

  • Process import results shown in a table at the end of process
Download this release

Release Info

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

Code changes from version 1.17.4 to 1.17.4.1

classes/helper.php CHANGED
@@ -319,6 +319,32 @@ class ACUI_Helper{
319
  <?php
320
  }
321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  function execute_datatable(){
323
  ?>
324
  <script>
319
  <?php
320
  }
321
 
322
+ function print_results( $results, $errors ){
323
+ ?>
324
+ <h3><?php _e( 'Results', 'import-users-from-csv-with-meta' ); ?></h3>
325
+ <table id="acui_errors">
326
+ <tbody>
327
+ <tr>
328
+ <th><?php _e( 'Users processed', 'import-users-from-csv-with-meta' ); ?></th>
329
+ <td><?php echo $results['created'] + $results['updated']; ?></td>
330
+ </tr>
331
+ <tr>
332
+ <th><?php _e( 'Users created', 'import-users-from-csv-with-meta' ); ?></th>
333
+ <td><?php echo $results['created']; ?></td>
334
+ </tr>
335
+ <tr>
336
+ <th><?php _e( 'Users updated', 'import-users-from-csv-with-meta' ); ?></th>
337
+ <td><?php echo $results['updated']; ?></td>
338
+ </tr>
339
+ <tr>
340
+ <th><?php _e( 'Errors, warnings and notices found', 'import-users-from-csv-with-meta' ); ?></td>
341
+ <td><?php echo count( $errors ); ?></td>
342
+ </tr>
343
+ </tbody>
344
+ </table>
345
+ <?php
346
+ }
347
+
348
  function execute_datatable(){
349
  ?>
350
  <script>
classes/import.php CHANGED
@@ -219,6 +219,7 @@ class ACUI_Import{
219
  $row = 0;
220
  $positions = array();
221
  $errors = array();
 
222
 
223
  ini_set('auto_detect_line_endings',TRUE);
224
 
@@ -612,24 +613,25 @@ class ACUI_Import{
612
  }
613
 
614
  // wordpress default user created and edited emails
615
- if( get_option('acui_automatic_created_edited_wordpress_email') == 'true' && $created ){
616
- do_action( 'register_new_user', $user_id );
617
- }
618
-
619
- if( get_option('acui_automatic_created_edited_wordpress_email') == 'true' && !$created ){
620
- do_action( 'edit_user_created_user', $user_id, 'both' );
621
  }
622
 
623
  // send mail
624
  if( isset( $mail_for_this_user ) && $mail_for_this_user ){
625
  ACUI_Email_Options::send_email( $user_object, $positions, $headers, $data, $created, $password );
626
  }
 
 
 
627
  endif;
628
  endwhile;
629
 
630
  $acui_helper->print_table_end();
631
 
632
  $acui_helper->print_errors( $errors );
 
 
633
 
634
  // let the filter of default WordPress emails as it were before deactivating them
635
  if( !get_option('acui_automatic_wordpress_email') ){
219
  $row = 0;
220
  $positions = array();
221
  $errors = array();
222
+ $results = array( 'created' => 0, 'updated' => 0 );
223
 
224
  ini_set('auto_detect_line_endings',TRUE);
225
 
613
  }
614
 
615
  // wordpress default user created and edited emails
616
+ if( get_option('acui_automatic_created_edited_wordpress_email') === 'true' ){
617
+ ( $created ) ? do_action( 'register_new_user', $user_id ) : do_action( 'edit_user_created_user', $user_id, 'both' );
 
 
 
 
618
  }
619
 
620
  // send mail
621
  if( isset( $mail_for_this_user ) && $mail_for_this_user ){
622
  ACUI_Email_Options::send_email( $user_object, $positions, $headers, $data, $created, $password );
623
  }
624
+
625
+ // results
626
+ ( $created ) ? $results['created']++ : $results['updated']++;
627
  endif;
628
  endwhile;
629
 
630
  $acui_helper->print_table_end();
631
 
632
  $acui_helper->print_errors( $errors );
633
+
634
+ $acui_helper->print_results( $results, $errors );
635
 
636
  // let the filter of default WordPress emails as it were before deactivating them
637
  if( !get_option('acui_automatic_wordpress_email') ){
import-users-from-csv-with-meta.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Import and export users and customers
4
  Plugin URI: https://www.codection.com
5
  Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
6
- Version: 1.17.4
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
3
  Plugin Name: Import and export users and customers
4
  Plugin URI: https://www.codection.com
5
  Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
6
+ Version: 1.17.4.1
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://codection.com/go/donate-import-users-from-csv-with-meta/
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: 5.7
7
- Stable tag: 1.17.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,9 @@ Plugin will automatically detect:
103
 
104
  == Changelog ==
105
 
 
 
 
106
  = 1.17.4 =
107
  * New shortcode to export users
108
 
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: 5.7
7
+ Stable tag: 1.17.4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Changelog ==
105
 
106
+ = 1.17.4.1 =
107
+ * Process import results shown in a table at the end of process
108
+
109
  = 1.17.4 =
110
  * New shortcode to export users
111