September 2007
Intermediate to advanced
600 pages
20h 21m
English
For instance, assume for the moment that the user has just filled out a user name/password form (more on that later), and you have verified that the user name and password are correct. You could then use a line such as the following to remember that the user is logged in:
<cfset SESSION.isLoggedIn = "Yes">
As you learned in the last chapter, the isLoggedIn variable is tracked for the rest of the user’s visit (until their session times out). From this point forward, if you wanted to ensure that the user was logged in before they were shown something, all you would need to do would be to check for the presence of the variable:
<cfif not isDefined("SESSION.isLoggedIn")> Sorry, you don't have permission to look ...Read now
Unlock full access