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

swill - January 23, 2008 - 17:26

i am also having the same issue...

#2

stephband - May 7, 2008 - 09:08

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

#3

benracer - January 18, 2009 - 15:09

Same problem here, anyone have a fix?

Sorry to bring up an old thread!

#4

benracer - January 18, 2009 - 15:21

Duplicate Post!

 
 

Drupal is a registered trademark of Dries Buytaert.