I am working in co-development with a friend and somehow the landing/slash page was changed. Now every time you login, you are "splashed" to your profile page & not the "home" page, as it always has been. I have searched and searched for what was changed, with no avail. Since I didn't cause this action, I am not real sure where to fix it. Only Module know to have been added/changed is Signups, I believe..? any help, greatly appreciated!! :) newbie :)

Comments

dbeall’s picture

This is probably due to upgrading from D6.10 to D6.11..

The change back is found in the core(shame on me) modules/user/user.module

Open up the user.module file and find

/**
 * Submit handler for the login form. Redirects the user to a page.
 *
 * The user is redirected to the My Account page. Setting the destination in
 * the query string (as done by the user login block) overrides the redirect.
 */
function user_login_submit($form, &$form_state) {
  global $user;
  if ($user->uid) {
    $form_state['redirect'] = 'user/'. $user->uid;
    return;
  }
}

comment out the contents of the function

/**
 * Submit handler for the login form. Redirects the user to a page.
 *
 * The user is redirected to the My Account page. Setting the destination in
 * the query string (as done by the user login block) overrides the redirect.
 */
/**
 *function user_login_submit($form, &$form_state) {
 *  global $user;
 *  if ($user->uid) {
 *    $form_state['redirect'] = 'user/'. $user->uid;
 *    return;
 *  }
 *}
*/

save it, load it, test it

bobderiemacker’s picture

"comment out the contents of the function" ...?????? not sure what that means...
i assume replace top section of code with bottom section??
thanks

dbeall’s picture

Yes...the top shows the file as you will find it and the bottom shows the same part of the file with the code commented out.

You can also redirect with triggers and actions.. this post is not on Drupal, but is correct as well, just a different way.
http://www.jamesjordaniii.com/webd/action_triggers

grobemo’s picture

Also see http://drupal.org/node/449386 on the same topic.

dbeall’s picture

see also here, same issue http://drupal.org/node/450588
lol there may be a lot of see this too on this one..lol