I have 2 user roles. When a user logs in, I want to redirect the user to a specific page based on their role. I tried the Login_destination module, but it has not worked for me. I have also tried using the trigger action, but it has also not helped me. When I used this trigger action, the ajax module threw an unexpected error message.. SO please help me.. How do I solve this problem...

  • I haven't got time to write a proper, in depth answer sorry, but try the rules module. It should be able to do that.
    – rooby
    Commented Apr 20, 2013 at 14:18
  • Hey rooby, i am use the rules module i did it.. but one problem is their , when user directly enter the redirected page path then it not restricted..this page is open so how solve this issue. will u give me solution about it..
    – Mahi143
    Commented Apr 25, 2013 at 15:38

1 Answer 1


This is possible with rules You can try the following

  1. Create a rule with event as "User has logged in".

  2. Add condition "User has role(s)" and configure it as in screenshotenter image description here

  3. Then save the condition.

  4. Now add action to you rule and select "page redirect" under system in the select the action to add dropdown.
  5. This will open a form which will allow you to set the redirection path, simply in the value field give the internal page path you want the user to be redirected to and then save it.Check the screenshot for better understanding enter image description here This way you can set redirect for one role and similarly you can create one more rule in a similar way for the other user role, if you want the other role to redirect to some other page.
  • i installed rule module but not display in menus of admin... !
    – Mahi143
    Commented Apr 25, 2013 at 12:24
  • arpitr:- this write answer for drupal 7, but i am using drupal 6 will u give me solution for d6.
    – Mahi143
    Commented Apr 25, 2013 at 15:35
  • did you enable rules ui module, if not please enable the rules ui module then you can see the rules under configuration.Mahi I need to check on d6, I didn get time I'll update you once I review it on d6,
    – arpitr
    Commented Apr 25, 2013 at 16:48

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.