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

swill’s picture

i am also having the same issue...

stephband’s picture

I'm having the same issue, too. In fact, Static URL is not doing anything either.

benracer’s picture

Same problem here, anyone have a fix?

Sorry to bring up an old thread!

benracer’s picture

Duplicate Post!

ddrozdik’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Version 5 of the module is not supported anymore.