After we login we are redirected to the user.module where the registered user could change it's user settings.
I think it's better to let an admin choose which page should be displayed here so we could make (for example) a node where the user could read what the difference is between logged-in and not logged in or display another module like the book.module for example.
* just like the 'begin'-link on the front page is configurable..
Comments
Comment #1
moshe weitzman commentedIn many cases, you are logged back into the page which you are trying to view. So if you you go to a forum home page, and login using the login box from there, you arrive right back at forum home page, this time as a logged in user. So this request only applies to the case when you login from the actual login page (i.e. ?mod=user)
Comment #2
Stefan Nagtegaal commentedYes, that's right...
Comment #3
drummSetting status to won't fix.
Comment #4
Stefan Nagtegaal commentedMArking as active and currently rolling a patch...
Comment #5
analogduck commentedYay! This is a feature I've been wanting to see. Anybody care to post a hack work-around I could use until then? I've been searching and searching through the code for the right item to edit. I imagine it's got to be in user.module, and I've tried several spots, but failed. :P
Clues always welcome! =)
-- Sean
Comment #6
analogduck commentedI figured out the hack to hardcode a different page as a work-around until the functionality is integrated in Drupal. I wish I was smart enough to do the job correctly, but I'm still only vaguely familiar with the Drupal code.
The line numbers referenced in the following notes are from user.module,v 1.407 2004/10/18 18:29:15.
Originally I thought that it was in the user_block section of the user.module, between line numbers 498 and 508:
However, changing the above code did not yield any visible results upon logging in. The correct spot was in the user_login section between lines 817 and 820:
I changed:
to:
$edit['destination'] = 'node';Yes, I know it's ugly, it's evil, and it breaks the functionality whereby you could login and remain on the same page. However, for the site I was building, I just needed every logged in user to go to a specific page upon logging in every single time, which was necessarily different from the home page of the site. So, as improper as my hack was, it got the job done. I'm looking forward to seeing this feature rolled into the Drupal package properly though. =)
Comment #7
analogduck commentedAccidentally hit submit when I meant to hit preview. Sorry, I pasted the wrong version of the code when referencing lines 817-820. The correct lines of code in the un-hacked user.module are:
It drives me crazy that I can't edit my own comments in the case of errors like this. :P
Comment #8
catchlogintobboggan does this now.
Comment #9
moshe weitzman commentedmore simply, try login_destination.module