On 6/22/04 10:31 PM, "Joe Rinehart" <[EMAIL PROTECTED]> wrote:
> Hi Jeff,
>
> The way I deal with this is to use a CFC that stays in the session
> scope.  However, I usually don't use the CFLOGIN framework, and my
> answers may reflect this, but I image you could adapt it pretty
> quickly.
>
> My opinions on the two questions:
>
> 1.  Yup, I'd validate the result of the query inside the CFC
> itself....leading to...
>
> 2.  I'd place the CFLOGIN code after the query inside the CFC.  I'd
> first CFLOGOUT the person regardless, and I'd return whether or not it
> was a valid login as a boolean.  Sorta like this:
>
[Snip code]

Okay, so my next question...is this a valid "init()" function? In other
words, the idea is that I'm not going to create a "user" object with a
CFINVOKE unless they pass thru the query successfully, and are logged in. So
is this leading me to the idea that the successful login of a user is a
valid use of an "init()" function?

I guess I should at least say where my head is with regards to all of this.
There are SO MANY ways to accomplish this, and I'm trying to make a nice,
solid CFC that eventually could be used in a Flash Remoting environment.
It's not going to be right now, as this will be a regular, CF-based
application, but at some point I'd like to use this in a Flash version of
this same application.

I wasn't really aware of being able to actually USE <cfloginuser> inside of
a CFC because I kept thinking, "what do you return in this instance?" My
first attempt at this just uses a method in "user.cfc" to "validateUser()"
and set that equal to a session variable using <cfset session.myvariable =
CreateObject("component", etc etc etc).validateUser(Form.Username,
Form.password)> (I know, I know, I'm just typing it from memory.) But you
get the idea...then, use the <CFLOGINUSER> tag after I've created that
object...man, I hope that's a decent way to do it..but I want to do it the
BEST, more ROBUST, and best practices way I can. I'm really interested in
doing all of this right since I'm going to take the time to do it as a CFC
based application anyway.

So any help at this point is especially appreciated...
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to