It's not clear to me what exactly you want to achieve with the Login destination module. But if all you want to do is to redirect a user after logging in, to a page that somehow corresponds to which roles the user has, then you can simply do that using the Rules module. And optionally also use the Conditional Rules module if you have more sophisticated redirect logic you need to implement.
Read on for more details about all this using some rules examples to get you going. These Rules are in Rules export format, which you can import in your own site if you have the Rules UI enabled, and after you enabled this rule
Example that should match your case
{ "rules_redirect_selected_roles_to_selected_pages" : {
"LABEL" : "Redirect selected roles to selected pages",
"PLUGIN" : "reaction rule",
"ACTIVE" : false,
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "user_login" : [] },
"IF" : [
{ "NOT user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "3" : "3" } } } },
{ "user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "4" : "4" } } } }
],
"DO" : [ { "redirect" : { "url" : "cms\/[account:uid]\/myhomepage" } } ]
}
}
Here is what this rule does, after a users completed a login:
Check if for the logged in user both of these Rules Conditions are true
:
- the user does not have role "administrator" (which is the role with role id = "3").
- the user does have the role with role id = "4".
If both (!!!) Rules Conditions are satisfied, then the Rules Action will perform a redirect to cms/[account:uid]/myhomepage
, whereas the [account:uid]
in this redirect path will be replaced by the uid of the user who logged in.
Notes:
- In this rule there is no check about "authenticated role", because as per the Rules Event (="User has logged in"), you can be sure the user is authenticated.
- If needed, adapt the role id (="4") in the above rules example to fit the role id of your role that corresponds to role "employee entry form". If you have other custom roles (not mentioned in your question), then it could well be that the role id for "employee entry form" is another value.
More sophisticated redirect example
After you also enable the Conditional Rules module, you can implement (way) more sophisticated redirect logic, as in this Rules example:
{ "rules_redirect_selected_roles_to_selected_pages" : {
"LABEL" : "Redirect selected roles to selected pages",
"PLUGIN" : "reaction rule",
"ACTIVE" : false,
"OWNER" : "rules",
"REQUIRES" : [ "rules_conditional", "rules" ],
"ON" : { "user_login" : [] },
"DO" : [
{ "CONDITIONAL" : [
{
"IF" : { "user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "3" : "3" } } } },
"DO" : [ { "redirect" : { "url" : "node\/32" } } ]
},
{ "ELSE" : [
{ "CONDITIONAL" : [
{
"IF" : { "user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "4" : "4" } } } },
"DO" : [ { "redirect" : { "url" : "node\/14" } } ]
},
{ "ELSE" : [ { "redirect" : { "url" : "node\/22" } } ] }
]
}
]
}
]
}
]
}
}
Here is what this rule does, after a users completed a login:
if the user has access to role with role id = 3 (= admin), then a redirect is done to node/32
.
else if the user has access to role with role id = 4 (= some custom role), then a redirect is done to node/14.
else redirect to node/22.
Adapt the node ids (= 32, 14, 23) and role ids (=3, 4, ...) to whatever fits your case, and extend the if/then/else constructs as much as you want (or use a "switch"-alternative if you prefer).
Note: as an alternative to using the Conditional Rules module to implement the above Rules logic, you can also split such rules in multiple rules, and combine that with replacing the Rules Actions which invoke appropriate Rules Components. For more details on that, refer to the answer to "What's the alternative to using the Conditional Rules module?".
Conclusion
With only 1 custom rule you can implement whatever redirect logic so that for each role you implement an appropriate page to redirect to after logging in. That's really it, and it works like a charm.