Version Description
- Fixed bug in WP User Manager addon
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.17.6.3 |
Comparing to | |
See all releases |
Code changes from version 1.17.6.2 to 1.17.6.3
- addons/learndash.php +37 -0
- addons/wp-user-manager.php +41 -0
- import-users-from-csv-with-meta.php +2 -1
- readme.txt +4 -1
addons/learndash.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
+
|
5 |
+
if( !class_exists( 'SFWD_LMS' ) ){
|
6 |
+
return;
|
7 |
+
}
|
8 |
+
|
9 |
+
class ACUI_LearnDash{
|
10 |
+
function __construct(){
|
11 |
+
add_filter( 'acui_restricted_fields', array( $this, 'restricted_fields' ), 10, 1 );
|
12 |
+
add_action( 'acui_documentation_after_plugins_activated', array( $this, 'documentation' ) );
|
13 |
+
}
|
14 |
+
|
15 |
+
function restricted_fields( $acui_restricted_fields ){
|
16 |
+
return array_merge( $acui_restricted_fields, array( 'lms_courses' ) );
|
17 |
+
}
|
18 |
+
|
19 |
+
function documentation(){
|
20 |
+
?>
|
21 |
+
<tr valign="top">
|
22 |
+
<th scope="row"><?php _e( "LearnDash is activated", 'import-users-from-csv-with-meta' ); ?></th>
|
23 |
+
<td>
|
24 |
+
<?php _e( "This plugin lets you bulk import users into Learndash courses:", 'import-users-from-csv-with-meta' ); ?>.
|
25 |
+
<ul style="list-style:disc outside none; margin-left:2em;">
|
26 |
+
<li><?php _e( "Column ", 'import-users-from-csv-with-meta' ); ?> lms_courses: <?php _e( "You have to specify the course IDs you want to enrol a specific user into", 'import-users-from-csv-with-meta' ); ?></li>
|
27 |
+
<li><?php _e( "You also need to create, for each course, the respective ", 'import-users-from-csv-with-meta' ); ?> course_courseID_access_from <?php _e( "where courseID needs to be replaced (as column header) with the same id you used in lms_courses, and the column cells populated with a string such as the one you will find in the metakey section of the plugin looking for that particular metakey (course_courseID_access_from).
|
28 |
+
This is because Learndash needs to know when a user was enrolled to which course.", 'import-users-from-csv-with-meta' ); ?></li>
|
29 |
+
</ul>
|
30 |
+
<span class="description"><?php _e( "Thanks to @prangesco who explain us how to do it", 'import-users-from-csv-with-meta' ); ?></span>
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
<?php
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
new ACUI_LearnDash();
|
addons/wp-user-manager.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
+
|
4 |
+
if( !is_plugin_active( 'wp-user-manager/wp-user-manager.php' ) ){
|
5 |
+
return;
|
6 |
+
|
7 |
+
}
|
8 |
+
|
9 |
+
class ACUI_WP_User_Manager{
|
10 |
+
function __construct(){
|
11 |
+
add_filter( 'acui_force_reset_password_edit_profile_url', array( $this, 'force_reset_password_edit_profile_url' ) );
|
12 |
+
add_filter( 'acui_force_reset_password_redirect_condition', array( $this, 'force_reset_password_redirect_condition' ) );
|
13 |
+
add_action( 'wpum_account_page_content', array( $this, 'force_reset_password_notice' ), 0 );
|
14 |
+
add_action( 'wpum_after_user_password_change', array( $this, 'force_reset_save_account_details' ) );
|
15 |
+
}
|
16 |
+
|
17 |
+
function force_reset_password_edit_profile_url(){
|
18 |
+
global $wpdb;
|
19 |
+
$query = "SELECT ID FROM ".$wpdb->posts." WHERE post_content LIKE '%[wpum_account]%' AND post_status = 'publish'";
|
20 |
+
$results = $wpdb->get_results( $query );
|
21 |
+
$result = $results[0];
|
22 |
+
|
23 |
+
return get_permalink( $result->ID ) . "/password";
|
24 |
+
}
|
25 |
+
|
26 |
+
function force_reset_password_redirect_condition(){
|
27 |
+
global $post;
|
28 |
+
return has_shortcode( $post->post_content, 'wpum_account' );
|
29 |
+
}
|
30 |
+
|
31 |
+
function force_reset_password_notice(){
|
32 |
+
if ( get_user_meta( get_current_user_id(), 'acui_force_reset_password', true ) ) {
|
33 |
+
echo apply_filters( 'acui_force_reset_password_message', __( '<span class="acui_force_reset_password_message">Please change your password</span>', 'import-users-from-csv-with-meta' ) );
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
function force_reset_save_account_details( $user_id ){
|
38 |
+
delete_user_meta( $user_id, 'acui_force_reset_password' );
|
39 |
+
}
|
40 |
+
}
|
41 |
+
new ACUI_WP_User_Manager();
|
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.6.
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
@@ -11,6 +11,7 @@ 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 |
if ( ! defined( 'ABSPATH' ) )
|
15 |
exit;
|
16 |
|
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.6.3
|
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 |
+
|
15 |
if ( ! defined( 'ABSPATH' ) )
|
16 |
exit;
|
17 |
|
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.6.
|
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.6.2 =
|
107 |
* Objects in CSV can now be printed using serialization
|
108 |
|
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.6.3
|
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.6.3 =
|
107 |
+
* Fixed bug in WP User Manager addon
|
108 |
+
|
109 |
= 1.17.6.2 =
|
110 |
* Objects in CSV can now be printed using serialization
|
111 |
|