One way is to check for the existence of a client or session variable.  For
example, when the user logs in you set a client or user variable, and the
value of that variable is that users ID or unique key value from the
database.  Then anywhere else you need that information you can just run a
query and use the Where ID = '#session.id#' or something like that.  Taking
this another step.  If the user is logged in ok, you could create a
structure with in a session variable and store all the user info that you
need to in that.  Then where ever you need that information you don't even
have to run the query like described above.  You can just reference your
structure and your set.  Hope this makes sense.

Bill

> -----Original Message-----
> From: Ryan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 16, 2000 5:29 PM
> To: [EMAIL PROTECTED]
> Subject: good way to login/track users?
>
>
> Whats a good way to login users? In a previous application, we just
> checked their username + password, if it matched what was stored
> in the database we set Session.authenicated = 1. When they logged
> out we set it to 0.
>
> But then whenever a user did something user specific, we not only
> had to check if they were logged in, but if what they were accessing
> their own data only. For example, when they clicked on a mail message
> to read it, the URL was something like read_mail.cfm?msgID=445. So
> read_mail.cfm not only had to check the value of Session.authenicated,
> but also compare the user ID stored with message 445 to the user ID
> trying to read it.
>
> Now we're building a new application that still has users as
> the first one did, is there a better way to do it this time?
> Please don't just point me to a custom tag, I need to learn
> how to do this. I have about 6 months CF experience and am
> beginning building a very large application. Thanks,
>
> Ryan
>
> ------------------------------------------------------------------
> ------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> _talk or send a message to [EMAIL PROTECTED] with
> 'unsubscribe' in the body.
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to