The documentation says I should be able to set a destination for a form using '#redirect'.... Am I missing something on the way to call the user-login form for my 403 page? Thanks for any help.

var_dump(array(
drupal_get_form('user_login'),
drupal_get_form('user_login', array('dest' => array('#type'=>'hidden', '#value'=>'123'))),
drupal_get_form('user_login', array('#redirect' => '678')),
));

Neither redirects and all show an empty "dest" or no "redirect".

Comments

Grey Teardop’s picture

You may want to check the LoginToboggan or the Login destination module.

There's also a discussion: http://drupal.org/node/60148.

nicknickoli’s picture

I'm still not seeing where the redirect is coming from or why mine doesn't work? By default, the user_login form should just redirect to whatever calls it... That's what the form action shows.

We've got loginToboggan and there's a redirect for logins but that's not being used. Instead the form always goes to user/*** unless the url has ?destination=node/***.

Thanks for any ideas.