Easy. Assuming you set a Session variable called IsLoggedIn, put the
following code in your Application.cfm:

<cfif NOT (IsDefined("Session.IsLoggedIn") AND Session.IsLoggedIn) AND
FindNoCase("login.cfm",CGI.PATH_INFO) EQ 0>
        <cflocation url="login.cfm">
</cfif>

In other words, if they are not already logged in, and they are not on the
login page, force them to the login page. (The latter is necessary to
prevent endless loops.)

Adjust as necessary for your application.





> -----Original Message-----
> From: FlashGuy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 8:16 AM
> To: CF-Talk
> Subject: RE: Login/Password screen
> 
> 
> That part is no problem. Its what I need to put into the 
> application.cfm to timeout or after 2-3 attempts lock the user out.
> Also once they log in they might drag a shortcut to their 
> desktop which would bypass my index.cfm in the root that has 
> the authentication code.
> How can I "force" them to the login screen everytime 
> regardless if they dragged a shortcut?
> 
> 
> 
> On Fri, 13 Dec 2002 13:10:45 -0000, Craig Dudley wrote:
> 
> > That's quite simple to code yourself, why don't you give it 
> a try and
> > post any questions here if you get stuck?
> > 
> > Just pass a username and password from a from into a query, if a
> > matching record is found, the queries record count will be 
> 1 and you can
> > authenticate the user, that's quite simplistic but basically all you
> > need.
> > 
> > Have a go, you know you want to ;-)
> > 
> > -----Original Message-----
> > From: FlashGuy [mailto:[EMAIL PROTECTED]] 
> > Sent: 13 December 2002 12:43
> > To: CF-Talk
> > Subject: Login/Password screen
> > 
> > Hi,
> > 
> > I know there are alot of custom tags out there that will do what I'm
> > looking for but I want the best one. So this is why I'm 
> asking all of
> > you hoping you've had 
> > some experience with some of them. I'd like everything stored in a
> > database. I know some don't do that. Bascially, once the 
> user enters in
> > their 
> > username/password they are redirected to a URL on the 
> server based on
> > the authentication.
> > 
> > I have one called <CF_EzPassword> but was wondering if there are any
> > better ones?
> > 
> > Thanks
> > 
> > 
> > ---------------------------------------------------
> > Colonel Nathan R. Jessop
> > Commanding Officer
> > Marine Ground Forces
> > Guatanamo Bay, Cuba
> > ---------------------------------------------------
> > 
> > 
> > 
> > 
> > 
> > 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Reply via email to