Answers.Body: <p>Your best bet with Drupal is to use the <a href="https://www.drupal.org/project/rules" rel="noreferrer">Rules module</a>.  I think you also need to have <a href="https://www.drupal.org/project/civicrm_entity" rel="noreferrer">CiviCRM Entity</a> installed to get the proper tokens.</p>
  
  <p><strong>Add a new Rules Component:</strong></p>
  
  <ol>
  <li>Component Plugin: Action Set</li>
  <li>Name the component (e.g.: Fetch CiviCRM ID of logged in user)</li>
  <li>You only need one variable, choose CiviCRM > CiviCRM Contact (may need the CiviCRM Entity module for this step).  Give it a label (e.g.: Contact) and a machine name (e.g. civi_contact).  For usage, leave it on Parameter.</li>
  </ol>
  
  <p>For the actions in the Action Set:</p>
  
  <p><em>Add new action (1):</em></p>
  
  <ol>
  <li>Entities > Fetch Entity by Property (not one of the many possibilities listed under CiviCRM headings)</li>
  <li>Value: User</li>
  <li>Property - Value: CiviCRM Contact</li>
  <li>For Value - Data Selector, choose whatever the machine name of your Variable above is (e.g. civi-contact).</li>
  <li>Limit the result count to 1.</li>
  <li>Save</li>
  </ol>
  
  <p><em>Add new action (2):</em></p>
  
  <ol start="7">
  <li>System > Page redirect</li>
  <li>Specify your URL - you should now be able to use the <code>[your-machine-name:id]</code> token (e.g. <code>[civi-contact:id]</code>) to fill in the logged in user's Civi Contact ID.</li>
  <li>Save</li>
  </ol>
  
  <p><strong>Then create a new rule</strong></p>
  
  <ol>
  <li>Reacts on Event: User > User has logged in</li>
  <li>Add a condition: User > User has role(s); specify which role(s)</li>
  <li>Set actions: use the Rules component that you just created (all the way at the bottom of the list).</li>
  </ol>
  
  <p>Lastly, clone the rule component and rule as much as you need depending on how many different roles are going to different places.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-09T03:20:15.123Z
Answers.Text: Great.  I think to display the contact dashboard I'll need the token for civi contact_id unless there is some link between the drupal id and the civi one.  I'm not finding a token for any of the civi things on the drupal side.  What might it be?
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-09T03:43:27.723Z
Answers.Text: Great catch.  I've edited my answer a bit.  I've got the CiviCRM Entity module installed, so I've got more Civi Tokens that I know what to do with.  I'm playing with Step 3-1 in order to get the right recipe to pull the Linked CiviCRM contact ID.
Answers.UserDisplayName: Allen Hutchison
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-09T04:06:01.337Z
Answers.Text: Okay, got it!  Re-editing... you have to create a component for the rule first...
Answers.UserDisplayName: Allen Hutchison
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-09T03:03:58.103Z
Answers.LastActivityDate: 2016-01-09T06:58:51.270Z
Answers.LastEditDate: 2016-01-09T06:58:51.270Z
Answers.UserDisplayName: Allen Hutchison
Answers.Body: <p>Allen has a great explanation for how to do this, particularly for anytime anyone logs in.  Just for completeness, I wanted to make sure this simple option was documented, too.</p>
  
  <p>You may not really want all logins to go to the contact dashboard.  It may be really that you want certain links to lead people there, but others logging in (you and other admins, for example) should end up somewhere else.  In that case, you can link to</p>
  
  <pre><code>http://example.org/user?destination=civicrm/user
  </code></pre>
  
  <p>(replacing <code>http://example.org</code> with your base URL) wherever you want people to log in and end up at the user dashboard.</p>
  
  <p>Note that this does not work well with additional parameters, so a redirect to a particular contribution page won't work well, since the page ID isn't in the main Drupal path.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-09T04:50:45.483Z
Answers.LastActivityDate: 2016-01-09T04:50:45.483Z
Answers.UserDisplayName: Andie Hunt
Body: <p>We're on civicrm 4.5.8 and drupal 7.</p>
  
  <p>I'm testing accepting donations including recurring, which means the contacts will need logins.  When they login I think I'd like the landing place to be their contact dashboard or at the very least have a direct link to it in the menu.  Right now it seems that the users have to select My Account then after their name and address stuff there is a link for View Contact Dashboard.</p>
  
  <p>Can I make it go their directly after they login?  </p>
  
  <p>Really, ideally, depending on their role I'd like them to be directed to different places, e.g. back office staff goes to the standard Civicrm home page normal users go to contact dashboard.</p>
  
Tags: <drupal><dashboard><redirect>
Title: How can I redirect users to the contact dashboard after login?
ThreadText: # How can I redirect users to the contact dashboard after login?
  
  (Asked by: username_0 on 2016-01-09)
  
  We're on civicrm 4.5.8 and drupal 7.
  
  I'm testing accepting donations including recurring, which means the contacts will need logins. When they login I think I'd like the landing place to be their contact dashboard or at the very least have a direct link to it in the menu. Right now it seems that the users have to select My Account then after their name and address stuff there is a link for View Contact Dashboard.
  
  Can I make it go their directly after they login?
  
  Really, ideally, depending on their role I'd like them to be directed to different places, e.g. back office staff goes to the standard Civicrm home page normal users go to contact dashboard.
  
  **Tags:** drupal, dashboard, redirect
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-01-09. Score: 6
  
  Your best bet with Drupal is to use the [Rules module](https://www.drupal.org/project/rules). I think you also need to have [CiviCRM Entity](https://www.drupal.org/project/civicrm_entity) installed to get the proper tokens.
  
  **Add a new Rules Component:**
  
  1. Component Plugin: Action Set
  2. Name the component (e.g.: Fetch CiviCRM ID of logged in user)
  3. You only need one variable, choose CiviCRM > CiviCRM Contact (may need the CiviCRM Entity module for this step). Give it a label (e.g.: Contact) and a machine name (e.g. civi\_contact). For usage, leave it on Parameter.
  
  For the actions in the Action Set:
  
  *Add new action (1):*
  
  1. Entities > Fetch Entity by Property (not one of the many possibilities listed under CiviCRM headings)
  2. Value: User
  3. Property - Value: CiviCRM Contact
  4. For Value - Data Selector, choose whatever the machine name of your Variable above is (e.g. civi-contact).
  5. Limit the result count to 1.
  6. Save
  
  *Add new action (2):*
  
  7. System > Page redirect
  8. Specify your URL - you should now be able to use the `[your-machine-name:id]` token (e.g. `[civi-contact:id]`) to fill in the logged in user's Civi Contact ID.
  9. Save
  
  **Then create a new rule**
  
  1. Reacts on Event: User > User has logged in
  2. Add a condition: User > User has role(s); specify which role(s)
  3. Set actions: use the Rules component that you just created (all the way at the bottom of the list).
  
  Lastly, clone the rule component and rule as much as you need depending on how many different roles are going to different places.
  
  > **Comments:**
  > **username_0**: Great.  I think to display the contact dashboard I'll need the token for civi contact_id unless there is some link between the drupal id and the civi one.  I'm not finding a token for any of the civi things on the drupal side.  What might it be?  
  > **username_1**: Great catch.  I've edited my answer a bit.  I've got the CiviCRM Entity module installed, so I've got more Civi Tokens that I know what to do with.  I'm playing with Step 3-1 in order to get the right recipe to pull the Linked CiviCRM contact ID.  
  > **username_1**: Okay, got it!  Re-editing... you have to create a component for the rule first...  
  
  ---
  
  ### Answer by username_2 on 2016-01-09. Score: 4
  
  Allen has a great explanation for how to do this, particularly for anytime anyone logs in.  Just for completeness, I wanted to make sure this simple option was documented, too.
  You may not really want all logins to go to the contact dashboard.  It may be really that you want certain links to lead people there, but others logging in (you and other admins, for example) should end up somewhere else.  In that case, you can link to
  http://example.org/user?destination=civicrm/user
  
  (replacing http://example.org with your base URL) wherever you want people to log in and end up at the user dashboard.
  Note that this does not work well with additional parameters, so a redirect to a particular contribution page won't work well, since the page ID isn't in the main Drupal path.
  
  
  ---
  
  