Get user id after save post

I want to get the ID of the user that has been updated by the admin in user’s panel after the save_post, I have the following code but it shows nothing in the debug.log

add_action( ‘save_post’, ‘my_save_post_function’,10, 3 );
function my_save_post_function( $post_ID, $post, $update ) {
error_log($post_ID );
error_log( print_r( $post_ID , true ) );

I also enable this in wp-config.php

define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);

Read more here:: Get user id after save post

Leave a Reply

Your email address will not be published. Required fields are marked *