Closed (fixed)
Project:
Front Page
Version:
5.x-1.9
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Apr 2008 at 03:35 UTC
Updated:
18 Jun 2008 at 11:25 UTC
I've set it so that the authenticated user sees text and "type" as "themed".
For some reason, whenever a user logs in it goes straight to his profile.
The home link works great, just would like it to be the default...
Anyone know where to change this?
Comments
Comment #1
Phillip Mc commentedTry this module...
http://drupal.org/project/login_destination
Comment #2
Marquis commentedThanks for the reply, but I was kinda hoping to find some setting within this module or in the worst case a hardcoded alternative.
After reading my original post, I'm not sure I explained myself properly.
This only occurs right after logging in. If I reload the site root with an open session, then it loads the proper page set in Front_page admin.
So basically, I'd like users to be redirected to whatever page is set in the front_page as default right after loggin in...
Is this normal behavior?
Just dosen't feel like its not normal behavior.
Comment #3
Phillip Mc commentedthe normal behaviour is that when a user logs in (using the login block for example), they are brought to the page they were just looking at. not the profile.
It sounds like you're directing users to login using the www.example.com/user/login link, which means they will always see their profile when they login.
Comment #4
Marquis commentedYou're right.
I've put the login form for anonymous users which is posting to:
What else can I use so that users get sent to the authenticated front_page?
Comment #5
Phillip Mc commentedhave you tried putting in a custom login form on your front_page for users not logged in?
e.g.
note the
form action="front?destination=front_page"which tells Drupal to log this person in and bring them to the front_page.Comment #6
Marquis commentedHi,
I've tried your example and it works great. I've tried just changing the
I did strip down some css, to comply with the one I made. So I'm guessing I removed something I shouldn't have.
I can't seem to put my code here... here is a link to pastebin
http://pastebin.ca/987804
Can anyone see what my noob brain is doing wrong?
Comment #7
gsutcliffe commentedI needed a similar solution last week and all that was needed was to use the form_alter hook. Basically just hook into the login and add the redirect property, Drupal will do the rest:
I didn't do this with front_page, but the redirect will take any alias.
Comment #8
Phillip Mc commentedIt wasn't obvious glancing at the pastebin code why it wasn't working for you..i notice your form action was
<form action="/user"which directs the user to their profile page when they login which is what you didn't want.A simple and quick way of doing it if your site is already translated, is to try this:
(a) temporarily enable the login block, logout of your site and visit your front_page.
(b) Click on view source to grab the source HTML for your login form.
(c) login, disable the login block and use the snippet in your front_page settings.
Comment #9
martin_q@gsutcliffe re: #7
I have now solved this problem by installing the 6.2 version of login_destination. But I did originally try your hook form alter solution, but couldn't get it to work. Could you elaborate a little on where I would need to put it, and what else would need to change? Thanks.