[support] Custom User Login and Error Messages

Fred Jones fredthejonester at gmail.com
Wed Mar 18 10:46:35 UTC 2009


I have a Drupal 5 site with a custom login form, using function
phptemplate_user_login and user_login.tpl.php. It works fine, but
there are two issues. First is that if a user logins on the home page
he ends up at site.com/front. This is technically correct as front is
the front page. This is how drupal.org works--login on the home page
and you end at up http://drupal.org/node . We would like to change
this, however, to end up at site.com. I tried:

  $form['#action'] = base_path();

in both the tpl file and the template.php file but it didn't help.
This is not a major issue, but it would be nice.

The other one is quite perplexing and is serious. If a user attempts
to login from /user and fails then the expected message shows up. If
he does the same from the front page, then no message shows up. Both
pages use page.tpl.php and the code there is trivial:

  <?php print $messages ?>

yet it fails on the home page. Any ideas why that might be? This site
was built by someone else, and I looked through the template.php file
but I don't see anything which should be killing the message.

Thanks.


More information about the support mailing list