Support

Account

Home Forums Backend Issues (wp-admin) Limit post object to author inside user-edit.php (backend user profile) Reply To: Limit post object to author inside user-edit.php (backend user profile)

  • The problem is that the values are loaded using AJAX and during the AJAX request $profileuser probably does not contain any value.

    The 3rd argument that’s passed to your function should have the use ID, but I don’t really know what’s in the argument.

    you can find this out. Turn on error logging in WP by adding this to wp-config.php

    
    define('WP_DEBUG', true );
    define('WP_DEBUG_DISPLAY', true);
    define('WP_DEBUG_LOG', true);
    

    then in your filter do this

    
    ob_start();
    print_r($post);
    error_log(ob_get_clean());  
    

    Go to your user profile page, then you can look in the error log ‘/wp-contnet/error.log’ to see what get written to the file.