Hi
I got this problem that when user logs in to my website it should go straight to homepage but instead it goes to users profile page

do u know how to fix it?

Greg

Comments

GatorBat’s picture

I too experienced this after I upgraded my Drupal sites from 6.10 to 6.11. I've never had this happen before now. I checked to make sure my my default frontpage (in /admin/settings/site-information) is set to node like it has always been.

Any suggestions?

GatorBat’s picture

This same behavior now happens on a clean install (fresh database and new directory in sites/examplesite.com). While it is not the worse thing ever, it's a nuisance I haven't encountered since I started using Drupal around 5.4. I would love to return my sites to just leaving me on whatever page I was on when I logged in like it used to.

grigori’s picture

ohhhh yes, i guess i updated it, still has no idea how to fix it though

jnvsor’s picture

well if you use a block and log in it will go to whatever page you were on...

Theres probably a million fixes to this decade old issue, use google and you should find it xD

GatorBat’s picture

The login block has done this until now. Normally the login form (which is the standard login block placed at the top of the site) redirects them to the frontpage of the site. It's done this for ages, and only yesterday's core update has altered this behavior. I did google several different items, many of which refer to the Login Destination module. While I can try adding the Login Destination module in, I've NEVER in my 2 years of running Drupal sites (granted, I'm no expert) had this behavior occur, and I'm a bit hesitant to "hack the core" functions to alter a destination after login when it's worked flawlessly before, and on sites that have been running Drupal since 5.4 and survived their upgrades to Drupal 6.11.

Maybe my Google-Fu is a bit weak this morning, but I was figuring this was a more simple issue with a simple solution that I could easily be over looking. I'm sure the original poster and myself would appreciate any help the community can give us in solving this mystery.

vhenin’s picture

I've found a solution :
http://drupal.org/node/319352

dbeall’s picture

Following this issue..
I thought i had messed something up.. but guess not. The login block always kept me on the same page.. Now it goes to account page.

prunelle’s picture

I'm experiencing the same behavior after the core 6.11 update. I don't know if we have to report it as a bug.

Notice that d.o shows that behavior now too !

Any "official" explanation ?

Thanks for it.

prunelle’s picture

I've found the explanation I asked in my previous post here : #292565: Regression: Can't set /user to 403 page (was: login destination is broken)

CardAssassin’s picture

I was able to fix this issue by commenting out the contents of the function user_login_submit in user.module

dbeall’s picture

Your a Gem.. Works as normal now. Thanks, you saved me from brain melt down and rearranging my whole site, just after getting it the way I wanted it. The drupal.org site has same issue..
Thanks again.. dave

billnbell’s picture

This works. This should be an option in admin/ not a force redirect.

It would be nice to put up a long-term fix.

billnbell’s picture

I don't want the user to go to the home page... I want them to go to the page they came from.

I fixed it by putting a destination="page I am on" on the Log In link.

Bill

GatorBat’s picture

Strangely enough, yesterday's Core update to Drupal 6.12 has resolved the "bug" on all of my installations. Whatever page I was on when I log in stays the page after login has been completed (like it always had). Thanks to the community's many helpful suggestions for a work-around in the meantime :)

tborrome’s picture

have you upgraded to 6.13? i'm seeing this problem again in drupal 6.1.3.

dbeall’s picture

I haven't had any problems with D6.13, it's been a while since upgrade, all has been well since. I was surprised to see a new post here.. hmmm Makes me wonder whats up.
You are using a login block, The login page will possibly redirect.

tborrome’s picture

sorry for the duplicate post.

this doesnt happen in the login block, its when I go directly to a specific page that requires a login. i have my Default 403 set to user/login, so any page which requires permissions will show the login screen.

Before, when a page that requires specific permission is accessed by an anonymous user, the login will come up and after a successful login with permissions, it will go directly to the page that the user was trying to access.

Now, it always gets redirected to the user's My Account page after a successful login.

quick test is:
1. Set Default 403 set to user/login
2. try to access admin page /admin
3. Login as admin
4. It should go to the /admin page, right?

What i'm seeing is that it goes to /user/1 ... the my account page.

I just re-checked some of my old Drupal 5 sites and it redirects to the requested page and not the my account page.

Is this a changed behaviour in Drupal 6??

dbeall’s picture

when i use login page it takes me to my account page, the login block stays on the current page. D6.14
I would say it is normal.. I started with D6 June, 2008, never had a D5 site.

alf1230’s picture

Still no solution??

dbeall’s picture

There is some things to try in this other thread:
http://drupal.org/node/49795 ;Redirect After Login