I'd like to redirect a user, after registering, based on a custom token value embedded in their invite email join link.
Problems are, if I:
- use my own token value: "http://site.com/user/register?desination=/node/...", then invite module's tracking doesn't activate
- append my token value: "?destination=/node/...." to the end of [node-link], then it immediately redirects to my node - totally bypasses registration
- append my token value: "?inf=/node/...." to the end of the [node-link] - for use in a $form['#redirect'] - the invite module clears out my token value
Any ideas on how i can insert into or turn off invite module's redirecting?
Comments
Comment #1
Hunabku commentedOops in the above please replace [node-link] with [join-link]
Comment #2
Hunabku commentedMy solution works, however i wonder if there's a more elegant way?
I appended my token value: "?redirect=/node/...." to the end of [node-link] in the body of the invite email. Before the invite module clears my redirect parameter I grab it in my custom module function (see below) that stores it in the $_SESSION var - which is accessed later in a user form_alter to set $form['#redirect'].
Is there a better place to set my $_SESSION var then in the hook_user?
Also note that i unset $_SESSION['redirect'] in a user submit handler.
Comment #3
dale42I'm helping the Invite module maintainers by cleaning up old issues.
Drupal 6 is no longer supported so I'm setting the issue status to Closed (outdated). Information on what that means is here: Issue Status field.
If you have a question about one of the current versions of the module please do submit a new issue.