I have a destination parameter appended to /user/login using Redirect 403 to User Login. This presents users with the login page when they encounter a 403, allowing them to login and subsequently be redirected back to the page they were just on. For whatever reason, the redirect functionality that's built in is not working -- users are still directed to /user after logging in.
form_alter, I have tried:
$form_state['#redirect'], which is ignored.
- Similar in
$form['submit']['#submit'], along with
unset($form['#action'])which I'm not familiar with but I read somewhere might be applicable.
drupal_register_shutdown_function('drupal_goto', $destination)to set the redirect as a shutdown function which should execute after everything else and force a redirect.
drupal_static_reset('drupal_get_destination')before my shutdown function to try and reset any other redirects.
In all cases I have verified that my callbacks are running and that variables are being set as they should be, but nothing is working. Any ideas how to force this redirect or debug what is overriding it?