This is following up on the patch discussed in http://drupal.org/node/26467, I suppose:
In 4.6.5, when I'm on (for example) the main forum page and click on "Login to post a new forum topic", I'm taken to my user page instead of going back to the forum page, all logged in and ready to post. The link above discusses a change to drupal_get_destination that will supposedly make this work "right" in 4.7; I'm trying to get it working in 4.6.5, but with no luck. I've replaced drupal_get_destination in common.inc with the patched version, but it seems pretty clear that something more is needed. After logging in, the user's destination seems to be determined by what's specified in user_login, at:
// If we are already logged on, go to the user page instead.
if ($user->uid) {
drupal_goto();
}
but I'm not sure what to do here (or if that's even the right thing to do).
I'm obviously stumbling around in the dark here; can anyone shed some light on this issue?
Thanks,
Jim
Comments
Instead U can use login block
You can use login block on forums, once you fill the login details and submit through login block u'll be redirected to same page.
I am uisng a different approach, i made a custom login form in my theme which redirects the user after login to the same page.
But for 4.7 no need of any changes, it works as expected.
Sunny
www.gleez.com | www.sandeepone.com
Code sample or advice?
Hi, I am trying to do the same thing and am wondering if you could share your findings or a snippet. I have a custom login page for my theme and I am desperate to redirect a logged in user to a custom node, and NOT the ubiquitous user/profile page.
I have tried every possible configuration using front_page module, but nothing works. I'm on 4.7 and am using CVS version of front_page.
Any help would be gratefully received. Thanks.