Import users from CSV with meta - Version 1.14.2.5

Version Description

  • Problem fixed in cron job
Download this release

Release Info

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

Code changes from version 1.14.2.4 to 1.14.2.5

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.14.2.4
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
@@ -306,14 +306,14 @@ function acui_admin_tabs( $current = 'homepage' ) {
306
  }
307
 
308
  function acui_fileupload_process( $form_data, $is_cron = false, $is_frontend = false ) {
309
- if ( !isset( $form_data['security'] ) || !wp_verify_nonce( $form_data['security'], 'codection-security' ) ) {
310
  wp_die( __( 'Nonce check failed', 'import-users-from-csv-with-meta' ) );
311
  }
312
 
313
- if( empty( $_FILES['uploadfile']['name'] ) ):
314
- $path_to_file = sanitize_file_name( $form_data["path_to_file"] );
315
-
316
- if( !validate_file( $path_to_file ) ){
317
  wp_die( __( 'Error, path to file is not well written', 'import-users-from-csv-with-meta' ) . ": $path_to_file" );
318
  }
319
 
@@ -431,7 +431,7 @@ function acui_manage_cron_process( $form_data ){
431
  update_option( "acui_cron_path_to_move", sanitize_text_field( $form_data["path_to_move"] ) );
432
  update_option( "acui_cron_period", sanitize_text_field( $form_data["period"] ) );
433
  update_option( "acui_cron_role", sanitize_text_field( $form_data["role"] ) );
434
- update_option( "acui_cron_update_roles_existing_users", sanitize_text_field( $form_data["update-roles-existing-users"] ) );
435
  update_option( "acui_cron_delete_users", isset( $form_data["cron-delete-users"] ) && $form_data["cron-delete-users"] == "yes" );
436
  update_option( "acui_cron_delete_users_assign_posts", sanitize_text_field( $form_data["cron-delete-users-assign-posts"] ) );
437
  update_option( "acui_cron_change_role_not_present", isset( $form_data["cron-change-role-not-present"] ) && $form_data["cron-change-role-not-present"] == "yes" );
@@ -468,7 +468,6 @@ function acui_cron_process(){
468
 
469
  acui_cron_process_auto_rename(); // optionally rename with date and time included
470
  }
471
-
472
  $message .= __( '--Finished at', 'import-users-from-csv-with-meta' ) . ' ' . date("Y-m-d H:i:s") . '<br/><br/>';
473
 
474
  update_option( "acui_cron_log", $message );
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.14.2.5
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
306
  }
307
 
308
  function acui_fileupload_process( $form_data, $is_cron = false, $is_frontend = false ) {
309
+ if ( !defined( 'DOING_CRON' ) && ( !isset( $form_data['security'] ) || !wp_verify_nonce( $form_data['security'], 'codection-security' ) ) ){
310
  wp_die( __( 'Nonce check failed', 'import-users-from-csv-with-meta' ) );
311
  }
312
 
313
+ if( empty( $_FILES['uploadfile']['name'] ) ):
314
+ $path_to_file = wp_normalize_path( $form_data["path_to_file"] );
315
+
316
+ if( validate_file( $path_to_file ) !== 0 ){
317
  wp_die( __( 'Error, path to file is not well written', 'import-users-from-csv-with-meta' ) . ": $path_to_file" );
318
  }
319
 
431
  update_option( "acui_cron_path_to_move", sanitize_text_field( $form_data["path_to_move"] ) );
432
  update_option( "acui_cron_period", sanitize_text_field( $form_data["period"] ) );
433
  update_option( "acui_cron_role", sanitize_text_field( $form_data["role"] ) );
434
+ update_option( "acui_cron_update_roles_existing_users", isset( $form_data["update-roles-existing-users"] ) && $form_data["update-roles-existing-users"] == "yes" );
435
  update_option( "acui_cron_delete_users", isset( $form_data["cron-delete-users"] ) && $form_data["cron-delete-users"] == "yes" );
436
  update_option( "acui_cron_delete_users_assign_posts", sanitize_text_field( $form_data["cron-delete-users-assign-posts"] ) );
437
  update_option( "acui_cron_change_role_not_present", isset( $form_data["cron-change-role-not-present"] ) && $form_data["cron-change-role-not-present"] == "yes" );
468
 
469
  acui_cron_process_auto_rename(); // optionally rename with date and time included
470
  }
 
471
  $message .= __( '--Finished at', 'import-users-from-csv-with-meta' ) . ' ' . date("Y-m-d H:i:s") . '<br/><br/>';
472
 
473
  update_option( "acui_cron_log", $message );
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.2.1
7
- Stable tag: 1.14.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -91,6 +91,9 @@ Plugin will automatically detect:
91
 
92
  == Changelog ==
93
 
 
 
 
94
  = 1.14.2.4 =
95
  * HTML problems fixed
96
 
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.2.1
7
+ Stable tag: 1.14.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
91
 
92
  == Changelog ==
93
 
94
+ = 1.14.2.5 =
95
+ * Problem fixed in cron job
96
+
97
  = 1.14.2.4 =
98
  * HTML problems fixed
99