Import users from CSV with meta - Version 1.17.5.6

Version Description

  • Frontend force reset password fixed
Download this release

Release Info

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

Code changes from version 1.17.5.5 to 1.17.5.6

classes/force-reset-password.php CHANGED
@@ -15,7 +15,7 @@ class ACUI_Force_Reset_Password{
15
  }
16
 
17
  function new_user( $headers, $data, $user_id, $role, $positions, $form_data, $is_frontend, $is_cron, $password_changed ){
18
- if( isset( $form_data["force_user_reset_password"] ) && $form_data["force_user_reset_password"] == 'yes' && $password_changed )
19
  update_user_meta( $user_id, 'acui_force_reset_password', 1 );
20
  }
21
 
15
  }
16
 
17
  function new_user( $headers, $data, $user_id, $role, $positions, $form_data, $is_frontend, $is_cron, $password_changed ){
18
+ if( isset( $form_data["force_user_reset_password"] ) && in_array( $form_data["force_user_reset_password"], array( 'yes', 1 ) ) && $password_changed )
19
  update_user_meta( $user_id, 'acui_force_reset_password', 1 );
20
  }
21
 
classes/frontend.php CHANGED
@@ -371,19 +371,19 @@ class ACUI_Frontend{
371
 
372
  // start
373
  $form_data = array();
374
- $form_data[ "path_to_file" ] = get_attached_file( $csv_file_id );
375
 
376
  // emails
377
- $form_data[ "sends_email" ] = get_option( "acui_frontend_send_mail" );
378
- $form_data[ "send_email_updated" ] = get_option( "acui_frontend_send_mail_updated" );
379
  $form_data["force_user_reset_password"] = get_option( "acui_frontend_force_user_reset_password" );
380
 
381
  // roles
382
- $form_data[ "role" ] = empty( $atts['role'] ) ? get_option( "acui_frontend_role") : $atts['role'];
383
 
384
  // update
385
- $form_data["update_existing_users" ] = empty( get_option( "acui_frontend_update_existing_users" ) ) ? 'no' : get_option( "acui_frontend_update_existing_users" );
386
- $form_data["update_roles_existing_users" ] = empty( get_option( "acui_frontend_update_roles_existing_users" ) ) ? 'no' : get_option( "acui_frontend_update_roles_existing_users" );
387
 
388
  // delete
389
  $form_data["delete_users"] = ( get_option( "acui_frontend_delete_users" ) ) ? 'yes' : 'no';
@@ -391,9 +391,9 @@ class ACUI_Frontend{
391
  $form_data["delete_users_only_specified_role"] = empty( $form_data[ "role" ] ) ? false : $atts['delete-only-specified-role'];
392
 
393
  // others
394
- $form_data[ "empty_cell_action" ] = "leave";
395
- $form_data[ "activate_users_wp_members" ] = empty( get_option( "acui_frontend_activate_users_wp_members" ) ) ? 'no_activate' : get_option( "acui_frontend_activate_users_wp_members" );
396
- $form_data[ "security" ] = wp_create_nonce( "codection-security" );
397
 
398
  $form_data = apply_filters( 'acui_frontend_import_form_data', $form_data );
399
 
@@ -449,8 +449,6 @@ class ACUI_Frontend{
449
 
450
  if( !current_user_can( apply_filters( 'acui_capability', 'create_users' ) ) )
451
  wp_die( __( 'Only users who are able to create users can export them.', 'import-users-from-csv-with-meta' ) );
452
-
453
-
454
  ?>
455
  <form method="POST" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" class="acui_frontend_form">
456
  <input type="hidden" name="action" value="acui_export_users_csv"/>
371
 
372
  // start
373
  $form_data = array();
374
+ $form_data["path_to_file"] = get_attached_file( $csv_file_id );
375
 
376
  // emails
377
+ $form_data["sends_email"] = get_option( "acui_frontend_send_mail" );
378
+ $form_data["send_email_updated"] = get_option( "acui_frontend_send_mail_updated" );
379
  $form_data["force_user_reset_password"] = get_option( "acui_frontend_force_user_reset_password" );
380
 
381
  // roles
382
+ $form_data["role"] = empty( $atts["role"] ) ? get_option( "acui_frontend_role") : $atts["role"];
383
 
384
  // update
385
+ $form_data["update_existing_users"] = empty( get_option( "acui_frontend_update_existing_users" ) ) ? 'no' : get_option( "acui_frontend_update_existing_users" );
386
+ $form_data["update_roles_existing_users"] = empty( get_option( "acui_frontend_update_roles_existing_users" ) ) ? 'no' : get_option( "acui_frontend_update_roles_existing_users" );
387
 
388
  // delete
389
  $form_data["delete_users"] = ( get_option( "acui_frontend_delete_users" ) ) ? 'yes' : 'no';
391
  $form_data["delete_users_only_specified_role"] = empty( $form_data[ "role" ] ) ? false : $atts['delete-only-specified-role'];
392
 
393
  // others
394
+ $form_data["empty_cell_action"] = "leave";
395
+ $form_data["activate_users_wp_members"] = empty( get_option( "acui_frontend_activate_users_wp_members" ) ) ? 'no_activate' : get_option( "acui_frontend_activate_users_wp_members" );
396
+ $form_data["security"] = wp_create_nonce( "codection-security" );
397
 
398
  $form_data = apply_filters( 'acui_frontend_import_form_data', $form_data );
399
 
449
 
450
  if( !current_user_can( apply_filters( 'acui_capability', 'create_users' ) ) )
451
  wp_die( __( 'Only users who are able to create users can export them.', 'import-users-from-csv-with-meta' ) );
 
 
452
  ?>
453
  <form method="POST" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" class="acui_frontend_form">
454
  <input type="hidden" name="action" value="acui_export_users_csv"/>
classes/options.php CHANGED
@@ -89,6 +89,7 @@ class ACUI_Options{
89
  update_option( "acui_frontend_send_mail", isset( $form_data["send-mail-frontend"] ) && $form_data["send-mail-frontend"] == "yes" );
90
  update_option( "acui_frontend_send_mail_updated", isset( $form_data["send-mail-updated-frontend"] ) && $form_data["send-mail-updated-frontend"] == "yes" );
91
  update_option( "acui_frontend_mail_admin", isset( $form_data["send_mail_admin_frontend"] ) && $form_data["send_mail_admin_frontend"] == "yes" );
 
92
  update_option( "acui_frontend_send_mail_admin_address_list", sanitize_text_field( $form_data["send_mail_admin_frontend_address_list"] ) );
93
  update_option( "acui_frontend_delete_users", isset( $form_data["delete_users_frontend"] ) && $form_data["delete_users_frontend"] == "yes" );
94
  update_option( "acui_frontend_delete_users_assign_posts", sanitize_text_field( $form_data["delete-users-assign-posts-frontend"] ) );
89
  update_option( "acui_frontend_send_mail", isset( $form_data["send-mail-frontend"] ) && $form_data["send-mail-frontend"] == "yes" );
90
  update_option( "acui_frontend_send_mail_updated", isset( $form_data["send-mail-updated-frontend"] ) && $form_data["send-mail-updated-frontend"] == "yes" );
91
  update_option( "acui_frontend_mail_admin", isset( $form_data["send_mail_admin_frontend"] ) && $form_data["send_mail_admin_frontend"] == "yes" );
92
+ update_option( "acui_frontend_force_user_reset_password", isset( $form_data["force_user_reset_password"] ) && $form_data["force_user_reset_password"] == "yes" );
93
  update_option( "acui_frontend_send_mail_admin_address_list", sanitize_text_field( $form_data["send_mail_admin_frontend_address_list"] ) );
94
  update_option( "acui_frontend_delete_users", isset( $form_data["delete_users_frontend"] ) && $form_data["delete_users_frontend"] == "yes" );
95
  update_option( "acui_frontend_delete_users_assign_posts", sanitize_text_field( $form_data["delete-users-assign-posts-frontend"] ) );
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.5.5
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
@@ -11,7 +11,6 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
  Text Domain: import-users-from-csv-with-meta
12
  Domain Path: /languages
13
  */
14
-
15
  if ( ! defined( 'ABSPATH' ) )
16
  exit;
17
 
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.5.6
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
11
  Text Domain: import-users-from-csv-with-meta
12
  Domain Path: /languages
13
  */
 
14
  if ( ! defined( 'ABSPATH' ) )
15
  exit;
16
 
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.2
7
- Stable tag: 1.17.5.5
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.5.5 =
107
  * Frontend settings GUI improved
108
  * Force users to reset their passwords after login also available for frontend import
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.2
7
+ Stable tag: 1.17.5.6
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.5.6 =
107
+ * Frontend force reset password fixed
108
+
109
  = 1.17.5.5 =
110
  * Frontend settings GUI improved
111
  * Force users to reset their passwords after login also available for frontend import