Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have this in my Destination PHP snippet settings, and "Preserve Destination" unchecked
if (arg(1)=='add' && arg(2) == 'nodetype1') { // first check if we're on a particular page
return 'node/add/event2012';
}
else { // if not, check by user
global $user;
if ($user->uid == '1') {
return 'admin';
}
elseif (in_array('role1', $user->roles)) {
return 'hosted-events/' . $user->uid;
}
elseif (in_array('role2', $user->roles)) {
return 'dashboard';
}
else {
//return to previous login
return $_REQUEST['q'];
}
}
I have "redirect conditions" set to "always".
It seems that no matter what, the login always seems to redirect back to the original page.