patrick_corrigan
patrick_corrigan

Reputation: 899

Access current user's id in drupal views filter creteria

I'm trying to filter content based on the current user's id. Is this possible using Drupal Views?

Thank you very much :)

enter image description here

Upvotes: 1

Views: 1775

Answers (1)

Andreas Butze
Andreas Butze

Reputation: 151

If you want to show a list of content that is authored by the logged-in user, do the following:

  1. Add a new Contextual Filter
  2. Select 'Content: Author uid'
  3. Select the 'Provide default value'-option
  4. Select 'User ID from logged in user' from the dropdown

Hope this helps.

Upvotes: 3

Related Questions