Import users from CSV with meta - Version 1.11.3.1

Version Description

  • Thanks to Sebastian Mellmann(@xenator) a bug have been solved in password management in new users
Download this release

Release Info

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

Code changes from version 1.11.3 to 1.11.3.1

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.11.3
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
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.11.3.1
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
importer.php CHANGED
@@ -274,11 +274,21 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
274
  $created = false;
275
  }
276
  elseif( email_exists( $email ) && $allow_multiple_accounts == "allowed" ){ // if the email is registered and repeated emails are allowed
 
 
 
 
 
277
  $hacked_email = acui_hack_email( $email );
278
  $user_id = wp_create_user( $username, $password, $hacked_email );
279
  acui_hack_restore_remapped_email_address( $user_id, $email );
280
  }
281
  else{
 
 
 
 
 
282
  $user_id = wp_create_user( $username, $password, $email );
283
  }
284
 
274
  $created = false;
275
  }
276
  elseif( email_exists( $email ) && $allow_multiple_accounts == "allowed" ){ // if the email is registered and repeated emails are allowed
277
+ // if user is new, but the password in csv is empty, generate a password for this user
278
+ if( $password === "" ) {
279
+ $password = wp_generate_password();
280
+ }
281
+
282
  $hacked_email = acui_hack_email( $email );
283
  $user_id = wp_create_user( $username, $password, $hacked_email );
284
  acui_hack_restore_remapped_email_address( $user_id, $email );
285
  }
286
  else{
287
+ // if user is new, but the password in csv is empty, generate a password for this user
288
+ if( $password === "" ) {
289
+ $password = wp_generate_password();
290
+ }
291
+
292
  $user_id = wp_create_user( $username, $password, $email );
293
  }
294
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.4
7
- Stable tag: 1.11.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -71,6 +71,9 @@ Plugin will automatically detect:
71
 
72
  == Changelog ==
73
 
 
 
 
74
  = 1.11.3 =
75
  * Thanks to @xenator you can now import users with Allow Multiple Accounts with same Mail via cron
76
 
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.4
7
+ Stable tag: 1.11.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
71
 
72
  == Changelog ==
73
 
74
+ = 1.11.3.1 =
75
+ * Thanks to Sebastian Mellmann(@xenator) a bug have been solved in password management in new users
76
+
77
  = 1.11.3 =
78
  * Thanks to @xenator you can now import users with Allow Multiple Accounts with same Mail via cron
79