> I am using cookies to define whether a person is logged in.
> <cfif NOT isDefined('cookie.fsnep_login')>
> - no cookie
> - set return url
> - link to login page
> </cfif>
> 
> click to go to the login, log in and it does:
> <cfset k = structDelete(cookie,'fsnep_login',true)>
> <cfcookie name="fsnep_login" value="#validate_user.login_id[1]#">
> <cflocation url="#the_return_url#">
> 
> but when it returns to that url, the original code still fails and 
> seems to think that you're not logged in.  Oddly, if the return url 
> is "../index.cfm" then it seems to work.  Just not when it's coming 
> from the other url.  I tried refreshing the page to see if it was 
> just not updating but that doesn't help.

There's no need to delete the cookie and set the same cookie in the same
page. Just set the cookie to the value that you want.

> I believe this is down to an old 'bug' in CF where you cannot 
> set a cookie immediately before a CFLOCATION - there are ways 
> around it I think but off hand I cannot remember - sure someone
> will chip in ;-)

As of CFMX, this is no longer correct. You can use CFCOOKIE and CFLOCATION
within the same page.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213740
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to