Some administrators may wish to redirect a user to a specific page after registration, and again to another after confirming their account (for instance to a group page). Currently, the default behavior is either to a user page or to the home page.

This patch allows two new settings, 'Redirect on Registration', and 'Redirect on Confirmation'. Leaving them blank keeps the default behavior, or the admin can set them to specific pages, to which the user will be sent instead.

This version adds to the patch I wrote at http://drupal.org/node/47093 but goes beyond what that issue was going for, so I opened a new ticket instead.

Hey, btw, could anyone tell me why my patches keep getting uploaded here as .txt files? I'm using diff -uF^f logintoboggan.module logintoboggan.module.new > logintoboggan_redirects.patch to make my patches, but maybe that's the wrong syntax.

CommentFileSizeAuthor
logintoboggan_redirects.patch.txt4.87 KBaaron

Comments

rubenk’s picture

Tried this patch against 4.7.0 (had to manually make changes due to minor code differences).
Appears to work as stated.

hunmonk’s picture

Status: Needs review » Fixed

patch applied to 4.7 and HEAD, with minor changes (apparently, you had some custom code in hunk #3, so i removed it.)

thanks!

vincent’s picture

Category: feature » bug
Status: Fixed » Active

This functionality does not work when configure loggintobogan not to set the password in the registration (so normal drupal behavior). In other words, if I only want to use the redirection functionality it does not work.
If I chose to set the password at registration then redirection works.

hunmonk’s picture

Assigned: aaron » hunmonk
Status: Active » Closed (won't fix)

i don't think i want the option of sending a user to another page besides their user page when they click a one-time login link from an email where they haven't set their own password. marking this as won't fix.

hunmonk’s picture

wjlinville’s picture

I've used drupal for sometime but do not know php (so probably still a newbie). I've installed LoginTobbogan and have "set password" checked as well as "immediate login" checked.

Under Redirections, I have node/2 set as my redirect after the user has created an account.

However, it is still going to the user page (ie. user/32). Is this a known issue and is this patch the fix? If so, great - i just need to figure out how to install patches. Thanks for your help.

hunmonk’s picture

@wjlinville: the patch in this issue will not address your problem. i'm guessing you're getting interference from another contrib module -- try disabling all other contribs and see if the problem persists. if not, then you can triangulate the problem module from there.