I am using Woo Commerce, and I have substituted their My Account page for the standard WordPress author page. In order to get the content-likes.php template part to work right, I needed to edit the way it passes the current user object to $author. This is what I did in order to use that template part in the My Account page:
I am not sure if I understood your question correctly or not but if you are trying to get the current logged in user’s id, then you can use the following code and then use that value.