Project:Login Destination
Version:5.x-1.0
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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

#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!