Import users from CSV with meta - Version 1.10.6.5

Version Description

  • If multisite is enabled it adds the user to the blog thanks to Rudolph Koegelenberg
  • Tested up to 4.8
Download this release

Release Info

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

Code changes from version 1.10.6.4 to 1.10.6.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.10.6.4
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.10.6.5
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
importer.php CHANGED
@@ -274,6 +274,20 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false
274
  }
275
  }
276
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  // WP Members activation
278
  if( $activate_users_wp_members == "activate" )
279
  update_user_meta( $user_id, "active", true );
274
  }
275
  }
276
 
277
+ // Multisite add user to current blog
278
+ if( is_multisite() ){
279
+ if( !empty( $role ) ){
280
+ if( is_array( $role ) ){
281
+ foreach ($role as $single_role) {
282
+ add_user_to_blog( get_current_blog_id(), $user_id, $single_role );
283
+ }
284
+ }
285
+ else{
286
+ add_user_to_blog( get_current_blog_id(), $user_id, $role );
287
+ }
288
+ }
289
+ }
290
+
291
  // WP Members activation
292
  if( $activate_users_wp_members == "activate" )
293
  update_user_meta( $user_id, "active", true );
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.7.4
7
- Stable tag: 1.10.6.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -70,6 +70,10 @@ Plugin will automatically detect:
70
 
71
  == Changelog ==
72
 
 
 
 
 
73
  = 1.10.6.4 =
74
  * Documentation fixed: if user id is present in the CSV but not in the database, it cannot be used to create a new user
75
 
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.6.5
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.6.5 =
74
+ * If multisite is enabled it adds the user to the blog thanks to Rudolph Koegelenberg
75
+ * Tested up to 4.8
76
+
77
  = 1.10.6.4 =
78
  * Documentation fixed: if user id is present in the CSV but not in the database, it cannot be used to create a new user
79