Redirect user to same page on login I know there are a couple modules other there that handle login redirects like Login Destination, LoginToboggan, Login Redirect and Rules.  However, they all seem to only allow strict URLs.  I would like users to be redirected to the same page they logged in on.  The default behaviour of Drupal appears to redirect users to the previous page on login.

Since I am using a login modal, redirecting people to the previous page doesn't work well.

How can I redirect users to their current page when using a login modal that handles the login through AJAX?  I would appreciate a solution that could be placed in template.php maybe using hook_user_login()
Take a look at the implementation in user_login_block(), particularly this line:

$form['#action'] = url(current_path(), array('query' =&gt; drupal_get_destination(), 'external' =&gt; FALSE));


This will add the destination parameter to the URL, which takes precedence over any other arguments passed to drupal_goto() (like $form_state['redirect']).
Depending on how you create your modal, the easiest way would therefore be to simply append the destination argument for the current page to the form action.