I've got an installation of Drupal 5.7 running and I'm trying to redirect users to the welcome page immediately after login. I've had it working before, under Drupal 5.6 on another site. In this installation Login Destination is not doing anything at all.

I have it enabled, with path entered as Static URL and condition set to Always.

I've tried both the official release 5.x-1.0 and the dev release 5.x-1.x-dev.

Are there any obvious dependencies or conflicts I could be missing? I don't have too many other modules running. One is Autologout 5.x-1.3 - but I've had these two modules playing together nicely before.

Any suggestions?

Comments

SomebodySysop’s picture

I'm in the same boat. Anything?

SomebodySysop’s picture

I have a bit more information. I am using a custom login page (as opposed to the default one provided by the user.module).

When you look at login_destination_form_alter(), you see that it looks for a form_id = 'user_login_block' || 'user_login'. So, I figured I would create my own hook_alter (in my own custom module) to get login_destination to process my custom login form (lesspaper_login_block):

/**
 * Implementation of hook_form_alter().
 */
function lesspaper_form_alter($form_id, &$form) {
  // Stolen from login_destination: To get it to process our custom login block
  if (($form_id == 'lesspaper_login_block' || $form_id == 'user_login') && login_destination_apply_redirect()) {
    $_SESSION['login_page'] = $_GET['q'];
    $form['#action'] = login_destination_get_destination();
  }
}

This works.

ddrozdik’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Version 5 of the module is not supported anymore.