Answers.Body: <p>Can you create a smart group for each contact type and then use CiviGroup Roles Sync? </p>
  
  <p>Also if you add contact sub type field on the user registration profile and so that you can update the contact type and role on same screen.</p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-07T09:03:52.443Z
Answers.Text: I will try this
Answers.UserDisplayName: Moe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-01T16:31:41.363Z
Answers.LastActivityDate: 2019-08-01T16:31:41.363Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have the CiviGroup Roles Sync working fine but realistically i want to link Drupal Roles to the CiviCRM Contact Types.</p>
  
  <p>Is this possible? So if i add a role in Drupal it will be reflected in Civi? Instead of being added into a group.</p>
  
  <p>Thanks,</p>
  
  <p>Moe</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-01T08:53:25.177Z
Comments.Text: I have figured out how to do this using CiviRules however there is no option to "REMOVE" a contact type.
Comments.UserDisplayName: Moe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-01T09:35:03.007Z
Comments.Text: So for example: if you have Individual sub-types of Student, Parent & Staff and you have corresponding Drupal roles, and you add/remove the Parent role to a user then you want the contact to have the Parent sub-type added/removed automatically?  (Be aware that removing a sub-type from a contact risks losing custom data.)
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-01T09:44:03.397Z
Comments.Text: @Aidan - yes that is correct. I am using CiviRules for adding and its working but removing there is no CiviRule action to unassign a contact type
Comments.UserDisplayName: Moe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-01T13:55:25.937Z
Comments.Text: That almost certainly is on purpose -> that would be very dangerous. Removing a Contact Type can delete a truckload of data; Why do you map it to Contact Type? Why not use Tags eg?
Comments.UserDisplayName: KarinG - Semper IT
Tags: <drupal><groups><roles><rules>
Title: Link Contact Type with Drupal Roles
ThreadText: # Link Contact Type with Drupal Roles
  
  (Asked by: username_0 on 2019-08-01)
  
  I have the CiviGroup Roles Sync working fine but realistically i want to link Drupal Roles to the CiviCRM Contact Types.
  
  Is this possible? So if i add a role in Drupal it will be reflected in Civi? Instead of being added into a group.
  
  Thanks,
  
  Moe
  
  **Tags:** drupal, groups, roles, rules
  
  > **Comments:**
  > **username_0**: I have figured out how to do this using CiviRules however there is no option to "REMOVE" a contact type.  
  > **username_1**: So for example: if you have Individual sub-types of Student, Parent & Staff and you have corresponding Drupal roles, and you add/remove the Parent role to a user then you want the contact to have the Parent sub-type added/removed automatically?  (Be aware that removing a sub-type from a contact risks losing custom data.)  
  > **username_0**: @username_1 - yes that is correct. I am using CiviRules for adding and its working but removing there is no CiviRule action to unassign a contact type  
  > **username_2**: That almost certainly is on purpose -> that would be very dangerous. Removing a Contact Type can delete a truckload of data; Why do you map it to Contact Type? Why not use Tags eg?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2019-08-01. Score: 0 | Accepted answer
  
  Can you create a smart group for each contact type and then use CiviGroup Roles Sync?
  
  Also if you add contact sub type field on the user registration profile and so that you can update the contact type and role on same screen.
  
  HTH
  
  username_3
  
  > **Comments:**
  > **username_0**: I will try this  
  
  ---
  
  