Use Case - I've got several Dashboards (some custom View pages) in the site. Depending on the Role associated with a User, I want to direct them to thier respective Dashboard.

So an Editor would go to the Editor Dashboard, a Contributor would go to a Contributor Dashboard, etc. after they login.

(I'm using the OpenPublic distro)

  • Do you want to redirect user just after login??? Commented Apr 11, 2015 at 10:31
  • You can do this with the rules modules. Commented Apr 11, 2015 at 12:59

4 Answers 4


You can redirect user after checking their role(by using below PHP snippet)

<?php $GLOBALS['user']->roles; ?>

Your code will look something like this:

if($GLOBALS['user']->roles == 'editor') {

Note: this will work only when a user has single role associated with him.


You can use a panels for the dashboard and then create different variants based on roles using the Access rules.


Checkout the login destination module. Simple as that.



Few methods you could do this:

1) hook_init() - check user's role and redirect to the correct address.

2) With the Pages module, you can set each panel's (=view's) display rule as having a certain role. With this you can stay at the same address (say, /dashboard)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.