Version Description
- Thanks to @xenator you can now import users with Allow Multiple Accounts with same Mail via cron
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.11.3 |
Comparing to | |
See all releases |
Code changes from version 1.11.2 to 1.11.3
- import-users-from-csv-with-meta.php +10 -3
- importer.php +33 -6
- readme.txt +4 -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.
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
@@ -90,7 +90,8 @@ function acui_activate(){
|
|
90 |
add_option( "acui_cron_period" );
|
91 |
add_option( "acui_cron_role" );
|
92 |
add_option( "acui_cron_log" );
|
93 |
-
|
|
|
94 |
add_option( "acui_frontend_send_mail", false );
|
95 |
add_option( "acui_frontend_send_mail_updated", false );
|
96 |
add_option( "acui_frontend_role" );
|
@@ -133,6 +134,7 @@ function acui_delete_options(){
|
|
133 |
delete_option( "acui_cron_period" );
|
134 |
delete_option( "acui_cron_role" );
|
135 |
delete_option( "acui_cron_log" );
|
|
|
136 |
|
137 |
delete_option( "acui_frontend_send_mail" );
|
138 |
delete_option( "acui_frontend_send_mail_updated" );
|
@@ -460,7 +462,12 @@ function acui_manage_cron_process( $form_data ){
|
|
460 |
update_option( "acui_cron_path_to_move_auto_rename", true );
|
461 |
else
|
462 |
update_option( "acui_cron_path_to_move_auto_rename", false );
|
463 |
-
|
|
|
|
|
|
|
|
|
|
|
464 |
update_option( "acui_cron_path_to_file", $form_data["path_to_file"] );
|
465 |
update_option( "acui_cron_path_to_move", $form_data["path_to_move"] );
|
466 |
update_option( "acui_cron_period", $form_data["period"] );
|
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
|
90 |
add_option( "acui_cron_period" );
|
91 |
add_option( "acui_cron_role" );
|
92 |
add_option( "acui_cron_log" );
|
93 |
+
add_option( "acui_cron_allow_multiple_accounts", "not_allowed" );
|
94 |
+
|
95 |
add_option( "acui_frontend_send_mail", false );
|
96 |
add_option( "acui_frontend_send_mail_updated", false );
|
97 |
add_option( "acui_frontend_role" );
|
134 |
delete_option( "acui_cron_period" );
|
135 |
delete_option( "acui_cron_role" );
|
136 |
delete_option( "acui_cron_log" );
|
137 |
+
delete_option( "acui_cron_allow_multiple_accounts" );
|
138 |
|
139 |
delete_option( "acui_frontend_send_mail" );
|
140 |
delete_option( "acui_frontend_send_mail_updated" );
|
462 |
update_option( "acui_cron_path_to_move_auto_rename", true );
|
463 |
else
|
464 |
update_option( "acui_cron_path_to_move_auto_rename", false );
|
465 |
+
|
466 |
+
if ( isset ( $form_data["allow_multiple_accounts"] ) && $form_data["allow_multiple_accounts"] == "yes" )
|
467 |
+
update_option( "acui_cron_allow_multiple_accounts", "allowed" );
|
468 |
+
else
|
469 |
+
update_option( "acui_cron_allow_multiple_accounts", "not_allowed" );
|
470 |
+
|
471 |
update_option( "acui_cron_path_to_file", $form_data["path_to_file"] );
|
472 |
update_option( "acui_cron_path_to_move", $form_data["path_to_move"] );
|
473 |
update_option( "acui_cron_period", $form_data["period"] );
|
importer.php
CHANGED
@@ -48,12 +48,22 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
|
|
48 |
$activate_users_wp_members = "no_activate";
|
49 |
else
|
50 |
$activate_users_wp_members = $form_data["activate_users_wp_members"];
|
51 |
-
|
52 |
-
if(
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
if( empty( $form_data["approve_users_new_user_appove"] ) )
|
58 |
$approve_users_new_user_appove = "no_approve";
|
59 |
else
|
@@ -1313,6 +1323,7 @@ function acui_options(){
|
|
1313 |
$path_to_move = get_option( "acui_cron_path_to_move");
|
1314 |
$path_to_move_auto_rename = get_option( "acui_cron_path_to_move_auto_rename");
|
1315 |
$log = get_option( "acui_cron_log");
|
|
|
1316 |
|
1317 |
if( empty( $cron_activated ) )
|
1318 |
$cron_activated = false;
|
@@ -1346,6 +1357,9 @@ function acui_options(){
|
|
1346 |
|
1347 |
if( empty( $log ) )
|
1348 |
$log = "No tasks done yet.";
|
|
|
|
|
|
|
1349 |
|
1350 |
?>
|
1351 |
<h3><?php _e( "Execute an import of users periodically", 'import-users-from-csv-with-meta' ); ?></h3>
|
@@ -1389,6 +1403,19 @@ function acui_options(){
|
|
1389 |
<input type="checkbox" name="send-mail-updated" value="yes" <?php if( $send_mail_updated == true ) echo "checked='checked'"; ?>/>
|
1390 |
</td>
|
1391 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1392 |
<tr class="form-field form-required">
|
1393 |
<th scope="row"><label for="cron-delete-users"><?php _e( 'Delete users that are not present in the CSV?', 'import-users-from-csv-with-meta' ); ?></label></th>
|
1394 |
<td>
|
48 |
$activate_users_wp_members = "no_activate";
|
49 |
else
|
50 |
$activate_users_wp_members = $form_data["activate_users_wp_members"];
|
51 |
+
|
52 |
+
if( $is_cron ){
|
53 |
+
if( get_option( "acui_cron_allow_multiple_accounts" ) == "allowed" ){
|
54 |
+
$allow_multiple_accounts = "allowed";
|
55 |
+
}
|
56 |
+
else {
|
57 |
+
$allow_multiple_accounts = "not_allowed";
|
58 |
+
}
|
59 |
+
}
|
60 |
+
else {
|
61 |
+
if( empty( $form_data["allow_multiple_accounts"] ) )
|
62 |
+
$allow_multiple_accounts = "not_allowed";
|
63 |
+
else
|
64 |
+
$allow_multiple_accounts = $form_data["allow_multiple_accounts"];
|
65 |
+
}
|
66 |
+
|
67 |
if( empty( $form_data["approve_users_new_user_appove"] ) )
|
68 |
$approve_users_new_user_appove = "no_approve";
|
69 |
else
|
1323 |
$path_to_move = get_option( "acui_cron_path_to_move");
|
1324 |
$path_to_move_auto_rename = get_option( "acui_cron_path_to_move_auto_rename");
|
1325 |
$log = get_option( "acui_cron_log");
|
1326 |
+
$allow_multiple_accounts = get_option("acui_cron_allow_multiple_accounts");
|
1327 |
|
1328 |
if( empty( $cron_activated ) )
|
1329 |
$cron_activated = false;
|
1357 |
|
1358 |
if( empty( $log ) )
|
1359 |
$log = "No tasks done yet.";
|
1360 |
+
|
1361 |
+
if( empty( $allow_multiple_accounts ) )
|
1362 |
+
$allow_multiple_accounts = "not_allowed";
|
1363 |
|
1364 |
?>
|
1365 |
<h3><?php _e( "Execute an import of users periodically", 'import-users-from-csv-with-meta' ); ?></h3>
|
1403 |
<input type="checkbox" name="send-mail-updated" value="yes" <?php if( $send_mail_updated == true ) echo "checked='checked'"; ?>/>
|
1404 |
</td>
|
1405 |
</tr>
|
1406 |
+
|
1407 |
+
<?php if( is_plugin_active( 'allow-multiple-accounts/allow-multiple-accounts.php' ) ): ?>
|
1408 |
+
|
1409 |
+
<tr class="form-field form-required">
|
1410 |
+
<th scope="row"><label><?php _e( 'Repeated email in different users?', 'import-users-from-csv-with-meta' ); ?></label></th>
|
1411 |
+
<td>
|
1412 |
+
<input type="checkbox" name="allow_multiple_accounts" value="yes" <?php if( $allow_multiple_accounts == "allowed" ) echo "checked='checked'"; ?>/>
|
1413 |
+
<p class="description"><strong>(<?php _e( 'Only for', 'import-users-from-csv-with-meta' ); ?> <a href="https://wordpress.org/plugins/allow-multiple-accounts/"><?php _e( 'Allow Multiple Accounts', 'import-users-from-csv-with-meta' ); ?></a> <?php _e( 'users', 'import-users-from-csv-with-meta'); ?>)</strong>. <?php _e('Allow multiple user accounts to be created having the same email address.','import-users-from-csv-with-meta' ); ?></p>
|
1414 |
+
</td>
|
1415 |
+
</tr>
|
1416 |
+
|
1417 |
+
<?php endif; ?>
|
1418 |
+
|
1419 |
<tr class="form-field form-required">
|
1420 |
<th scope="row"><label for="cron-delete-users"><?php _e( 'Delete users that are not present in the CSV?', 'import-users-from-csv-with-meta' ); ?></label></th>
|
1421 |
<td>
|
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.
|
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.2 =
|
75 |
* Problem with WordPress default emails fixed
|
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
|
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 =
|
75 |
+
* Thanks to @xenator you can now import users with Allow Multiple Accounts with same Mail via cron
|
76 |
+
|
77 |
= 1.11.2 =
|
78 |
* Problem with WordPress default emails fixed
|
79 |
|