> > If and only if you are not logged in. If you are logged in, > > we never go inside the <cflogin> tag. > > Aha, so if we're not logged in, and we're on a page that's > using that application.cfm code (which in our case will pretty > much be all of them since it's in the root directory of the > site) we won't even step *INTO* the cflogin tag?
No, the exact opposite is true. If the user isn't logged in, and there's a CFLOGIN tag in Application.cfm, whatever code you have in there will run. Within the CFLOGIN block, you'd typically have code to check a user's credentials against some data repository (database, LDAP server, Windows domain, etc) and if they provide the right credentials, you'd log them in with the CFLOGINUSER tag. On subsequent page requests after the user logs in successfully, the code within CFLOGIN would be skipped. You can think of CFLOGIN as being similar to <cfif not LoggedIn>. > Hey, no problem, it's helping me tremendously in understanding > the principals behind the process that I learned at Fast Track. > Fast Track was GREAT (kudos to figleaf) but when I got home, I > noticed right away I was doing things slightly different and > immediately got lost. Hey, Jeff, I think you were in my class. I'm glad you found it useful! Since you have the course materials, I'd like to recommend that you install them on your machine, and play around with the CFLOGIN example provided. In that example, the CFLOGIN tag is placed within Application.cfm to force every user to log in before viewing any page. Within that example, there are about four things going on: 1. If the user hasn't just filled out a login form (which of course will be the case on the first page request), a login form is CFINCLUDEd, and the page is aborted. 2. If the user has just filled out a login form (which will be the case on the second page request), the form data is compared against a database. 3. If the data from (2) matches a record, the user is logged in with the CFLOGINUSER tag. 4. If the data from (2) doesn't match a record, the login form is again CFINCLUDEd as in (1). Let me know if that helps any. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

