So what's going on here is that in Drupal you can use the ?destination= parameter with any simple form, and after the form submits, you'll be returned to the path listed in the destination parameter.<br><br>So, if instead of just going to user/register, I go to user/register?destination=some/path, after the registration submits, you'll be returned to the path in the destination, as long as the form does not override this.<br>
<br>You can try this out. My local is d6git.l. I go unauthenticated to<br><br><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://d6git.l/user/register?destination=some/path">http://d6git.l/user/register?destination=some/path</a><br>
<br>and I register. When I press submit on the registration, I end up at some/path.<br><br>So all you need is a module that creates links to user/register that have the current page in the destination param. Instead of having a block with links to user/register in it, you have a block with links to user/register?this/page. <br>
<br>-Randy<br><br><div class="gmail_quote">On Fri, Sep 24, 2010 at 1:48 AM, nan wich <span dir="ltr"><<a href="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><div></div>
<div>Because if I have to show the code, then I would be disclosing something the customer owns. I don't know if I can sanitize it enough and have it still be readable.<br> </div><div class="im">
<p><font color="#ff007f" size="4" face="bookman old style, new york, times, serif"><i><b>Nancy</b></i></font></p>
<p> </p>
<p><font face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</font></p>
<div><br></div>
</div><div style="font-size: 12pt; font-family: arial,helvetica,sans-serif;"><br>
<div style="font-size: 12pt; font-family: times new roman,new york,times,serif;"><font size="2" face="Tahoma">
<hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Domenic Santangelo <<a href="mailto:domenics@gmail.com" target="_blank">domenics@gmail.com</a>><br><b><span style="font-weight: bold;">To:</span></b> <a href="mailto:development@drupal.org" target="_blank">development@drupal.org</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> Thu, September 23, 2010 4:30:30 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [development] Anonymous to Authenticated User Cookies<br></font><div><div>
</div><div class="h5"><br>I too use the destination param. I have noticed that you must be careful not to let it get lost if you're going to several intermediary pages.
<div><br></div>
<div>Curious as to why you'd want to take code off-list, surely the solution would be beneficial to the community?</div>
<div><br></div>
<div>-D</div>
<div><br></div>
<div><br>
<div>
<div>On Sep 22, 2010, at 8:27 AM, nan wich wrote:</div><br>
<blockquote type="cite"><span style="word-spacing: 0px; font: medium Helvetica; text-transform: none; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate;">
<div>
<div style="font-size: 12pt; margin: 0px; font-family: courier,monaco,monospace,sans-serif;">
<div style="margin: 0px;"></div>
<div style="margin: 0px;">I do this simply by using the "destination" query parameter. If you need more details on my code, we will have to take this off-list.<br> </div>
<p><font color="#ff007f" size="4" face="bookman old style, new york, times, serif"><i><b>Nancy</b></i></font></p>
<p><font face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</font></p>
<div style="margin: 0px;"><br></div>
<div style="font-size: 12pt; margin: 0px; font-family: courier,monaco,monospace,sans-serif;"><br>
<div style="font-size: 12pt; margin: 0px; font-family: times,serif;"><font size="2" face="Tahoma">
<hr size="1">
<b><span style="font-weight: bold;">From:</span></b><span> </span>AustinCMS <<a href="mailto:chana@austincms.com" rel="nofollow" target="_blank">chana@austincms.com</a>><br><b><span style="font-weight: bold;">To:</span></b><span> </span><a href="mailto:development@drupal.org" rel="nofollow" target="_blank">development@drupal.org</a><br>
<b><span style="font-weight: bold;">Sent:</span></b><span> </span>Tue, September 21, 2010 8:12:28 PM<br><b><span style="font-weight: bold;">Subject:</span></b><span> </span>[development] Anonymous to Authenticated User Cookies<br>
</font><br>I have the following scenario:<br><br>1. Anonymous user browses site.<br>2. He clicks on link (on Screen A)<span> </span><br>3. He is informed he must
login to proceed further (-> to Screen B)<br>3. He clicks on "Register" which takes him to account creation (Screen C) and on form submit to Content Profile for profile creation (Screen D).<br><br>Client then wants newly-created and authenticated user to be taken back to Screen B. In other words - where he was trying to head before<br>
being re-routed into creating an account and profile.<br><br>There seems to be a lot of discussion and proposed "solutions" for this scenario - but none that actually really work. Login Destination module<br>doesn't work because of Content Profile incompatibilities. AFAIK, LogonToboggan allows you to set a target after login - but not with the intermediate<br>
step of Profile creation. I can get a user back to the page where he logged in IF he is already an authenticated user and logging in from the User Login box. But so far, that is the<span> </span><br>only scenario that works even
remotely closely.<br><br>I'd like to understand better how cookies are managed in Drupal...especially going from an Anonymous session to an authenticated one under the scenario above.<br><br>I'd appreciate info - or a link to a good resource, if possible...<br>
<br>Thanks in advance!<br><br>Chana<br clear="all"><br><br><br><br></div></div></div></div></span></blockquote></div><br></div></div></div></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>
Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>