I've got a basic CFLOGIN framework going to secure an application. Everything is working fine, except after they log in I need to query a database for to pull info for each user. I used to use session variables, set in the login script, to do this.
I'd like to user cflogin.name and cflogin.password to identify the correct DB record. But the Adobe documentation says "You can use these values in the cflogin tag body to authenticate the user, and, in the cfloginuser tag, to log the user in. The structure is only available in the cflogin tag body."
This seems like it defeats the point of using CFLOGIN, since the code between <cflogin> and </cflogin> only executes when a user IS NOT logged in. Does this mean that upon entering the correct user/pass, I have to also set a session variable to identify the user outside of the CFLOGIN tag? It seems redundant...
Anyone have an explanation/solution? Below is my query and error.
THANKS!
<cfquery datasource="DS" name="QName" username="username" password="password">
SELECT *
FROM table
WHERE username = #cflogin.name#
</CFQUERY>
Error: Element NAME is undefined in CFLOGIN.
I'd like to user cflogin.name and cflogin.password to identify the correct DB record. But the Adobe documentation says "You can use these values in the cflogin tag body to authenticate the user, and, in the cfloginuser tag, to log the user in. The structure is only available in the cflogin tag body."
This seems like it defeats the point of using CFLOGIN, since the code between <cflogin> and </cflogin> only executes when a user IS NOT logged in. Does this mean that upon entering the correct user/pass, I have to also set a session variable to identify the user outside of the CFLOGIN tag? It seems redundant...
Anyone have an explanation/solution? Below is my query and error.
THANKS!
<cfquery datasource="DS" name="QName" username="username" password="password">
SELECT *
FROM table
WHERE username = #cflogin.name#
</CFQUERY>
Error: Element NAME is undefined in CFLOGIN.