I'm trying to make a view of articles written by an author. I use the author UID from the URL as a contextual filter.
I want to hide unpublished content from everybody except the author himself.
I have removed the published filter, hence all unpublished content is visible. My first guess was to write some php code to check if the uid of the logged in user and that from the URL are same or not. If true display unpublished content or else hide unpublished content. But could not implement it.
Please suggest any possible solutions. Thank You.