Drupal 7 login form redirect back to page which they logged in on $node-&gt;content['my_form'] = drupal_get_form('user_login');      


I am creating a form that as outputted on http://site.com/datacollection/the-data-collection

When the user successfully logs in they are redirected to users/USERNAME

In drupal 6, the user would be redirected to the same page they logged in from...How can I reproduce this behavior?
Create a action (admin/config/system/actions) 


You have to use the token module and find the right token for the needed path. (Maybe someone else can point the right token for this behavior.)


Create a trigger (admin/structure/trigger/user)


AFTER A USER HAS LOGGED IN -> redirect to the path