Thread Starter
syew91
(@syew91)
Additional information:
I can actually control the default WP information that goes into the report, with the following string:
function report_column( $column_value = '', $column_key, $report_item, $report_user ) {
switch( $column_key ) {
case 'user_id':
if ( $report_user instanceof WP_User ) {
$column_value = $report_user->ID;
}
break;
case 'user_name':
if ( $report_user instanceof WP_User ) {
$column_value = $report_user->display_name;
$column_value = str_replace("’", "'", $column_value );
}
break;
case 'user_email':
if ( $report_user instanceof WP_User ) {
$column_value = $report_user->user_email;
}
break;
But that is as far as I can get. By default, the WP_users are all tables within the phpmyadmin itself. Thus it is possible for me to retrieve it without sweat. Now the problem is, I can’t seem to be able to find any tables created by User Registration, thus I am not sure on where to retrieve it.
Hello @syew91,
We are glad you liked our plugin. The extra information are stored in usermeta table in the database. You can get all the extra information registered by user registration plugin with this query:
global $wpdb;
$usermeta = $wpdb->get_results( "SELECT user_id, meta_key, meta_value FROM $wpdb->usermeta WHERE meta_key LIKE 'user_registration\_%';" );
Also, you can use the action hook user_registration_after_register_user_action
, which provides 3 parameters to the callback function, $form_data, $form_d and $user_id
add_action( 'user_registration_after_register_user_action', 'ur_get_form_fields', 10, 3 );
function ur_get_form_fields( $form_data, $form_id, $user_id) {
// get data here
}
Hope this helps. If you are still facing issues, We’ll look into the working process of LearnDash LMS.
Best Regards,
WPEverest Support
Sanjeev Aryal
Thread Starter
syew91
(@syew91)
Hi Sanjeev,
Thanks for the explanation. And where would I put the lines into? Was it in the wp-include or user-registration plugin?
Thread Starter
syew91
(@syew91)
@sanzeeb3
Yo my man can I check with you on the top query?