0

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.

0

I think the similar question asked previously . You can find the solution at Use Views to display unpublished nodes to authors, but not to other users

  • Thank you for pointing that answer, spent quiet sometime trying to find a solution, but all in vain. – H.Saraf Jan 21 '16 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.