Import users from CSV with meta - Version 1.15.6.4

Version Description

  • Now you can use variables also in Subject, thanks to @vbarrier (https://wordpress.org/support/topic/use-variables-also-in-subject/)
Download this release

Release Info

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

Code changes from version 1.15.6.3 to 1.15.6.4

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.15.6.3
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.15.6.4
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
importer.php CHANGED
@@ -595,8 +595,9 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
595
  $body_mail = str_replace( "**loginurl**", wp_login_url(), $body_mail );
596
  $body_mail = str_replace( "**username**", $user_login, $body_mail );
597
  $body_mail = str_replace( "**lostpasswordurl**", wp_lostpassword_url(), $body_mail );
598
-
599
- if( !is_wp_error( $key ) ){
 
600
  $passwordreseturl = apply_filters( 'acui_email_passwordreseturl', network_site_url( 'wp-login.php?action=rp&key=' . $key . '&login=' . rawurlencode( $user_login ), 'login' ) );
601
  $body_mail = str_replace( "**passwordreseturl**", $passwordreseturl, $body_mail );
602
 
@@ -604,22 +605,25 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
604
  $body_mail = str_replace( "**passwordreseturllink**", $passwordreseturllink, $body_mail );
605
  }
606
 
607
- if( empty( $password ) && !$created )
608
  $password = __( 'Password has not been changed', 'import-users-from-csv-with-meta' );
 
609
 
610
- $body_mail = str_replace("**password**", $password, $body_mail);
611
- $body_mail = str_replace("**email**", $email, $body_mail);
612
 
613
  foreach ( $wp_users_fields as $wp_users_field ) {
614
  if( $positions[ $wp_users_field ] != false && $wp_users_field != "password" ){
615
- $body_mail = str_replace("**" . $wp_users_field . "**", $data[ $positions[ $wp_users_field ] ] , $body_mail);
616
- }
 
617
  }
618
 
619
  for( $i = 0 ; $i < count( $headers ); $i++ ) {
620
  $data[ $i ] = ( is_array( $data[ $i ] ) ) ? implode( "-", $data[ $i ] ) : $data[ $i ];
621
- $body_mail = str_replace("**" . $headers[ $i ] . "**", $data[ $i ] , $body_mail);
622
- }
 
623
 
624
  $body_mail = wpautop( $body_mail );
625
  $headers_mail = apply_filters( 'acui_import_email_headers', array( 'Content-Type: text/html; charset=UTF-8' ), $headers, $data );
595
  $body_mail = str_replace( "**loginurl**", wp_login_url(), $body_mail );
596
  $body_mail = str_replace( "**username**", $user_login, $body_mail );
597
  $body_mail = str_replace( "**lostpasswordurl**", wp_lostpassword_url(), $body_mail );
598
+ $subject = str_replace( "**username**", $user_login, $subject );
599
+
600
+ if( !is_wp_error( $key ) ){
601
  $passwordreseturl = apply_filters( 'acui_email_passwordreseturl', network_site_url( 'wp-login.php?action=rp&key=' . $key . '&login=' . rawurlencode( $user_login ), 'login' ) );
602
  $body_mail = str_replace( "**passwordreseturl**", $passwordreseturl, $body_mail );
603
 
605
  $body_mail = str_replace( "**passwordreseturllink**", $passwordreseturllink, $body_mail );
606
  }
607
 
608
+ if( empty( $password ) && !$created ){
609
  $password = __( 'Password has not been changed', 'import-users-from-csv-with-meta' );
610
+ }
611
 
612
+ $body_mail = str_replace( "**password**", $password, $body_mail );
613
+ $body_mail = str_replace( "**email**", $email, $body_mail );
614
 
615
  foreach ( $wp_users_fields as $wp_users_field ) {
616
  if( $positions[ $wp_users_field ] != false && $wp_users_field != "password" ){
617
+ $body_mail = str_replace( "**" . $wp_users_field . "**", $data[ $positions[ $wp_users_field ] ] , $body_mail );
618
+ $subject = str_replace( "**" . $wp_users_field . "**", $data[ $positions[ $wp_users_field ] ] , $subject );
619
+ }
620
  }
621
 
622
  for( $i = 0 ; $i < count( $headers ); $i++ ) {
623
  $data[ $i ] = ( is_array( $data[ $i ] ) ) ? implode( "-", $data[ $i ] ) : $data[ $i ];
624
+ $body_mail = str_replace( "**" . $headers[ $i ] . "**", $data[ $i ] , $body_mail );
625
+ $subject = str_replace( "**" . $headers[ $i ] . "**", $data[ $i ] , $subject );
626
+ }
627
 
628
  $body_mail = wpautop( $body_mail );
629
  $headers_mail = apply_filters( 'acui_import_email_headers', array( 'Content-Type: text/html; charset=UTF-8' ), $headers, $data );
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.4.1
7
- Stable tag: 1.15.6.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -99,6 +99,9 @@ Plugin will automatically detect:
99
 
100
  == Changelog ==
101
 
 
 
 
102
  = 1.15.6.3 =
103
  * Problems with roles being updated that should not be updated in multisite fixed
104
 
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.4.1
7
+ Stable tag: 1.15.6.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
99
 
100
  == Changelog ==
101
 
102
+ = 1.15.6.4 =
103
+ * Now you can use variables also in Subject, thanks to @vbarrier (https://wordpress.org/support/topic/use-variables-also-in-subject/)
104
+
105
  = 1.15.6.3 =
106
  * Problems with roles being updated that should not be updated in multisite fixed
107