Great Job Matt... do you have examples for that explanation?

On Wed, 7 Jul 2004 07:48:16 -0700, Matt Robertson
<[EMAIL PROTECTED]> wrote:
> There are a zillion ways to skin this cat.  I like to the
> login-related vars in application.cfm, that way there is always a
> value, and my security works off the assumption that the vars at least
> exist, so no isdefined tests other than this one:
>
> if (not IsDefined ("session.myData")) {
>        session.myData=StructNew();
>        StructInsert(session.myData,"isLoggedIn","NO");
>        StructInsert(session.myData,"UserType","ANYBODY");
>        StructInsert(session.myData,"LoginID","0");
> }
>
> Then you can perform a variety of login checks on each page
>
> if (CompareNoCase(session.myData.isLoggedIn,"YES")) {
>   ... test the UserType to show them what you want ...
> } else {
>   ... set a flag to boot them out to a login screen or something ...
> }
>
> In addition to securing the whole page, you can secure just parts of
> it by using stuff like  this within the page itself to alter the text
> displayed based on whether the user is logged in, and what kind of
> user they are if they are logged in.
>
> --
> --Matt Robertson--
> MSB Designs, Inc.
> mysecretbase.com
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to