Hi all,

I'm not REALLY clear on how any of the above work, but through trial and
error, I've been able to accomplish the desired result.  I wanted my users
to log into the site once, if authorization takes place, then set a cookie
so that next time they visit, the site will "remember" them and shoot them
past the login page to the homepage.  All works well, but now I have some
people who log in from work, share machines and do not want co-workers to
have access to our private site.

So, how do I erase that cookie?  How do I create a logout script for them?

The code on the frontpage after authorizing the username and password is:

<cfset session.userid = #username#>
<cfset client.userid=#userid#>
<cfcookie name="userid" value="#client.userid#" expires="NEVER">
<cflocation url="frontpage.html" addtoken="No">

The code on the login page that shoots them past to the home page if they
logged in before is:

<cfif isdefined("client.userid")>
<cfset session.userid="#client.userid#">
<cfcookie name="userid" value="#client.userid#">
<cflocation url="frontpage.html">
</cfif>

This works just as I wanted it to, though I know there is som extraneous
code in there that is probably not needed (like I said, I was using trial
and error to get this working.)

If I physically delete the cookie on my machine called:
[EMAIL PROTECTED] the login script escapes the <cfif> and goes asks
for login information. The contents of this file are:

CFTOKEN
<cftoken number>
www.bringyourbrain.net/
<number>
<number>
<number>
<number>
*
CFID
<number>
www.bringyourbrain.net/
0
<number>
<number>
<number>
<number>
*

1.  How do I allow my users to "logout" by deleting this cookie?

2. Obviously this isn't the best nor most secure way of doing this... anyone
have suggestions for me?  This is my hobby site, so its pretty small at this
point, but has the potential to get big with lots of users and lots of
privacy to protect.

Thanks!

Erika Foster


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to