2010
02.13
02.13
Redirection might become a little problematic if you are not sure how to do it in Drupal. You can add at the end of your link ?destination=redirect/here
but either the link might not work properly for some reason or you might prefer the referrer page to be dynamic.
Here is the solution:
$destination = drupal_get_destination();
print l('Login', 'user/login', array('query' => $destination));
print l('Login', 'user/login', array('query' => $destination));
Source: cglusky