|
|
CFCs and CFLoginUser(): msg#02497
|
Subject: |
CFCs and CFLoginUser() |
My current thinking on creating logins with CFCs is that you create a CFC
that passes in the Form.username and Form.password into a CFC that Queries
the DB and returns a Query object containing all of your information.
Once I've passed your username and password into the CFC and returned all of
your info (First Name, Last Name, Preferences, ID, Role) I then use
<cfloginuser> to log the user in.
This has brought up a couple of questions.
1. Would I check the query *inside* the CFC that queries the DB for your
information to make sure it's a valid Query Object? (In other words, to make
sure recordcount didn't equal 2 or 0).
2. Would you place your CFLogin code *inside* the CFC? I don't get that, but
someone here mentioned that you could do that. Query the DB, check the
Query, and login the user, all inside the CFC. If that's the case, what
would you return?
I think this is all a "best practices" question...so any advice is
appreciated.
Thanks
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
|
| |