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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.