I'm trying to use login_destination to redirect users when they log in to a certain page. In the URL field in the login_destination settings (with the "PHP snippet" radio button selected), I have this snippet:
global $user;
if ($user->uid == 18) {
// Redirect the Dealer role
return 'Support/support.html';
} elseif ($user->rid == 5) {
// Redirect the Employee role
return 'Partners/LocatePartner';
} else {
return 'node';
}
However, when I log in, it just takes me to the user profile page, as if this code doesn't exist. Is there something I'm doing wrong? I want to do it by roles, but I'm just trying to test with a specific user id for now to make sure it works.
Thanks.
Comments
Comment #1
swill commentedi am also having the same issue...
Comment #2
stephband commentedI'm having the same issue, too. In fact, Static URL is not doing anything either.
Comment #3
benracer commentedSame problem here, anyone have a fix?
Sorry to bring up an old thread!
Comment #4
benracer commentedDuplicate Post!
Comment #5
ddrozdik commentedVersion 5 of the module is not supported anymore.