> by itself will log in a user. GetAuthUser will test if a user
> is logged in.
The CFLOGIN tag does quite a bit more than just ask whether the user has
logged in. It allows you access to the CFLOGIN structure (useful if you're
using web server authentication, or follow the standard "j_username" and
"j_password" naming scheme for HTML login forms). It lets you specify the
length of a login period. It lets you control the scope of login cookies
sent to the client.
> Yes I've read the CF docs and see their example of using cflogin
> and cfloginuse. But, a) I don't like loading up my application.cfm
> with a lot of code, and b) I'm using Mach-II and want to test for
> user authentication in a preEvent plugin, not in application.cfm.
I don't see how you'll have any less code if you test whether a user is
logged in by using GetAuthUser(). In any case, you typically don't need a
lot of code for a login process. You don't have to put it in
Application.cfm, you just need to ensure that it's used on every page where
you want the user logged in before they can see the page. Usually, the
easiest way to do this is to use Application.cfm, of course.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

