ODBiC Discussion Board

RE: logging a user out of a session, Adam, 11-30-2005

Logging out

by Roger Harris, November 30, 2005 13:13

You can clear the session cookie, which is named odbic_sid (unless you are using the TAG keyword to override the "odbic" part of the name):

<% setcookie odbic_sid="", expires=0 %>
Optionally, you can also delete the session file (although these are eventually deleted anyway, I like to do this for a logout):
<% set stat=$deleteFile("/(path to session files)/"$odbic_sid$) %>
If you set the path to the session files with the TMP keyword, use the same file path, and the file name is the same as the session id variable value, e.g. $odbic_sid$. If you aren't using the TMP keyword to set that file path, then the files are placed in the default temporary directory, which can be accessed as:
<% set stat=$deleteFile($env("TEMP")"/"$odbic_sid$) %>


Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.