Answers.Body: <p>Found it!</p>
  <p>To limit views results to the current user, you want to:</p>
  <ol>
  <li><strong>Create a relationship</strong></li>
  </ol>
  <blockquote>
  <p>Go to Advanced &gt; Relationships &gt; Add 'CiviCRM Contacts: Drupal ID'</p>
  </blockquote>
  <ol start="2">
  <li><strong>Add the filter criteria</strong></li>
  </ol>
  <blockquote>
  <p>User: Current (Yes)</p>
  <p>On the Relationship dropdown, select Drupal User</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-01T16:01:40.420Z
Answers.LastActivityDate: 2017-12-01T16:01:40.420Z
Answers.LastEditDate: 2020-06-17T09:00:50.810Z
Answers.UserDisplayName: termdark
Body: <p>I'm trying to create a view to show a list of past events that were attended by the user that's currently logged in.</p>
  <p>Could anyone advise on the filter criteria needed to do this?</p>
  <p><strong>Fields</strong></p>
  <blockquote>
  <p>Event Title</p>
  <p>Event End date</p>
  </blockquote>
  <p><strong>Filter criteria</strong></p>
  <blockquote>
  <p>Status = attended</p>
  <p>???</p>
  </blockquote>
  
Tags: <drupal-views>
Title: Views: Filter results by current logged-in user
ThreadText: # Views: Filter results by current logged-in user
  
  (Asked by: username_0 on 2017-11-30)
  
  I'm trying to create a view to show a list of past events that were attended by the user that's currently logged in.
  
  Could anyone advise on the filter criteria needed to do this?
  
  **Fields**
  
  > Event Title
  >
  > Event End date
  
  **Filter criteria**
  
  > Status = attended
  >
  > ???
  
  **Tags:** drupal-views
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-12-01. Score: 5 | Accepted answer
  
  Found it!
  
  To limit views results to the current user, you want to:
  
  1. **Create a relationship**
  
  > Go to Advanced > Relationships > Add 'CiviCRM Contacts: Drupal ID'
  
  2. **Add the filter criteria**
  
  > User: Current (Yes)
  >
  > On the Relationship dropdown, select Drupal User
  
  
  ---
  
  