A guest user is on a page that they want to post a comment to at the bottom they see login or register to post comments. So they register and login, once logged in they end up viewing their profile. Should they not be redirect back to the node they wanted to post to?

This would make a lot more sense to me than expecting the user to now find the page they were on so they can post. It does this when your are a existing user and you login using the login block (hidden field “destination”).

How difficult would it be to have this for registration? In my opinion this would make things more seamless and solve some problems I am having with webforms and surveys that a user needs to be registered to use.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

magico’s picture

Version: 4.6.3 » x.y.z
alonpeer’s picture

Maybe the current URI and previous URI (the current page the user is watching and the previous one) should be saved in the $_SESSION, and when the user gets to the registration page (user/register), a special destination variable should be saved as well to the $_SESSION - let's say 'reg_destination'.
Then after the user logs in through the e-mail message he gets, Drupal will check if 'reg_destination' exists and send the user to that page instead of the user page (and unset that variable too).

coreb’s picture

Version: x.y.z » 6.x-dev

Moving out of the "x.y.z" queue to a real queue.

dbassendine’s picture

I've extended this patch (against 4.7.1) to cover login as well. The escaped hash in the original redirect forwarded users to "page not found" after login. Here, the redirect is to the node instead directly to the comment form.

dpearcefl’s picture

Is there any interest in this issue any longer?

otphacookceu’s picture

Очень увлекательный материал. Сейчас с хорошими статьями в ру_нете беда.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.