Skip to main content
Inspiring
July 18, 2008
Question

Session question

  • July 18, 2008
  • 1 reply
  • 220 views
I have a page that I use to log in to 'administor' club information. I
shouldn't be able to get to this page unless a session variable is set....
such as:

<cfif not structkeyexists(Session,"Username")>
<cflocation url="default2.cfm" addtoken="no">
</cfif>

But if I browse to the page that has this code at the top, I still get in,
even if its been a day since I logged in.

Why would this be occuring? And how can I prevent it, meaning how can I
force the <cflocation> to fire?

For some reason it thinks the session.Username is still active........


    This topic has been closed for replies.

    1 reply

    Inspiring
    July 18, 2008
    Steve Grosz wrote:
    >
    > For some reason it thinks the session.Username is still active........
    >

    Have you confirmed how long sessions are configured to live? This is
    definable in both the Administrator and in local code with either the
    <cfapplication...> tag or Applicatin.cfc properties.

    If they have been defined to live for one or more days then they will
    live that long unless the server is restarted in the mean time.