PHP snippet ignored in URL settings
wonder95 - November 16, 2007 - 05:57
| Project: | Login Destination |
| Version: | 5.x-1.0 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
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.

#1
i am also having the same issue...
#2
I'm having the same issue, too. In fact, Static URL is not doing anything either.
#3
Same problem here, anyone have a fix?
Sorry to bring up an old thread!
#4
Duplicate Post!