Answers.Body: <p>I don't have time to dig out an example but you should find you can add a Views Filter and specify the civi Domain. May depend on whether your View is starting with the Drupal User or with the CiviCRM Contact.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-17T08:19:45.533Z
Answers.Text: Thank you very much, this did the trick. It's also quite logical, but I must admit I didn't look for this filtering option.
Answers.UserDisplayName: Martin Peth
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-17T22:43:36.530Z
Answers.Text: Excellent - glad it was all the pointer that you needed.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-14T20:27:45.057Z
Answers.LastActivityDate: 2015-08-14T20:27:45.057Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I need to create a Drupal view (CiviCRM contacts) displaying the staff of an organisation. The view has the relationship CiviCRM contact &lt;-> Drupal user enabled. This seems to be required to be able to display the Drupal user images. </p>
  
  <p>Now comes the tricky part: The Drupal site where the view is created is an offspring of a CiviCRM multi-site setup. This means staff members usually have a Drupal account for domain 1 (the central CiviCRM) and domain 2 (the multi-site offspring where the Drupal view lives). In the DB this means they have 2 records in <code>civicrm_uf_match</code>. Now if the relationship is enabled AND the user image field is included, the view displays those contacts twice. Removing the relationship results in losing the user images.</p>
  
  <p>Any clues to a solution would be very welcome. </p>
  
Tags: <drupal-views><multisite>
Title: How to exclude multiple contact displays in Drupal view with contact-user relationship in CiviCRM multisite setting?
ThreadText: # How to exclude multiple contact displays in Drupal view with contact-user relationship in CiviCRM multisite setting?
  
  (Asked by: username_0 on 2015-08-14)
  
  I need to create a Drupal view (CiviCRM contacts) displaying the staff of an organisation. The view has the relationship CiviCRM contact <-> Drupal user enabled. This seems to be required to be able to display the Drupal user images.
  
  Now comes the tricky part: The Drupal site where the view is created is an offspring of a CiviCRM multi-site setup. This means staff members usually have a Drupal account for domain 1 (the central CiviCRM) and domain 2 (the multi-site offspring where the Drupal view lives). In the DB this means they have 2 records in `civicrm_uf_match`. Now if the relationship is enabled AND the user image field is included, the view displays those contacts twice. Removing the relationship results in losing the user images.
  
  Any clues to a solution would be very welcome.
  
  **Tags:** drupal-views, multisite
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-08-14. Score: 2 | Accepted answer
  
  I don't have time to dig out an example but you should find you can add a Views Filter and specify the civi Domain. May depend on whether your View is starting with the Drupal User or with the CiviCRM Contact.
  
  > **Comments:**
  > **username_0**: Thank you very much, this did the trick. It's also quite logical, but I must admit I didn't look for this filtering option.  
  > **username_1**: Excellent - glad it was all the pointer that you needed.  
  
  ---
  
  