I'm working on a site at the moment where some nodes are hidden behind a login. You can see a list of them, but to view them you need to sign in.
The sign in is done by showing the user login block in a lightbox.
Now the problem I'm having is the submit handler for the form isn't working properly. In my template.php file, it looks like this:
function fisita_redirect_after_login(&$form, &$form_state) {
drupal_set_message($form['hidden_paper_url']['#value']);
drupal_goto("http://www.google.com");
//$form['#redirect'] = $form['hidden_paper_url']['#value'];
//$form_state['#redirect'] = $form['hidden_paper_url']['#value'];
}
The Drupal set message, works fine, and it is outputting what I want (the URL we're trying to redirect to), but any attempt at changing the page isn't running. Either redirect or drupal_goto.
Does anyone have any clues?
Thanks