Verifying the Login Name and Password

Listing 23.3 provides simple code for your LoginCheck.cfm template. This is the template that will be included when the user attempts to gain access by submitting the login form from Listing 23.2.

The most important line in this template is the <cfset> line that sets the SESSION.auth.isLoggedIn variable to Yes. After this value is set for the session, the isDefined() test in the Application.cfc file (refer to Listing 23.1) will succeed and the user will be able to view pages normally.

Listing 23.3. LoginCheck.cfm—Granting Access
<!--- Filename: LoginCheck.cfm Created by: Nate Weiss (NMW) Purpose: Validates a user's password entries Please Note Included by LoginForm.cfm ---> <!--- Make sure we have Login ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.