• Resolved avinavaggarwal

    (@avinavaggarwal)


    ?Hey, How can I fetch data from data table on user profile page as per username?
    Like I have data of 500 users and want to show every user data on their profile page so how can i do this?

    Can anyone help me pls?

    I was using this code before but now this code crashes the user profile page.
    [insert_php]
    $user_id = um_profile_id();
    um_fetch_user( $user_id );
    if (is_user_logged_in() && get_current_user_id() == $user_id)
    {
    $emm = um_user(‘user_email’);
    $short = ‘[table id=4?filter_columns=”2″ filter = “‘.$emm.'”]’;
    echo do_shortcode($short);
    }
    [/insert_php]`

    Thanks
    Avinav

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Your best chance when using such custom code would be to check the server error log file for more information about what exact PHP error is happening.
    You could also first try showing a full table (without all the other code around it) to check if it’s TablePress that’s causing the problem.

    Regards,
    Tobias

    Thread Starter avinavaggarwal

    (@avinavaggarwal)

    Hey, I checked the error log file but no such defined error is showing.
    Can you share code how can I extract data from data table.

    Regards,
    Avinav

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sorry, I’m not familiar with your code or the PHP functions that you are using there. The general approach looks correct to me. You will have to find out more about the errors that are happening. You could maybe also try setting the WP_DEBUG constant to true, see https://www.ads-software.com/support/article/editing-wp-config-php/#wp_debug

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Extract data from table as per user’ is closed to new replies.