Copy link to clipboard
Copied
I just learned that I need to use onRequestStart event to have my login code.
My question ColdFusion pass target form to the function, so I can access all variable and controls on the form. Am I right?
It fires every time user request, so it is the place to validate user have the rights to access, can I use the code here for user login in to system?
If it fires every time when user request then I need pass session variavle to the function, so can I add more variables to the function or I need save some where on the form to accesss by function.
I am pretty new to ColdFusion, your help and information is great appreciated,
Regards,
Iccsi
Copy link to clipboard
Copied
Generally speaking, a user would only login once per SESSION, so you'd have that sort of thing in onSessionStart(), not onRequestStart().
--
Adam
Copy link to clipboard
Copied
Thanks a million for the message and help,
Can I add <CFArgument> to pass session variable to the function to validate user?
Like ID, Password and user Roles?
Thanks agian,
Regards,
Iccsi,
Copy link to clipboard
Copied
This is not a "write my code for me" environment. TRY IT. What happened? What can you infer from what happened?
You don't learn shit from asking questions & awaiting answers, you learn by doing.
Try it. Report back.
--
Adam
Copy link to clipboard
Copied
How cool. It censored my usage of "sh!t".
--
Adam
Copy link to clipboard
Copied
If you are new to ColdFusion, I highly recommend that you read ColdFusion books by Ben Forta. His books provide gentle explanations on what you can do with ColdFusion including user login, validation, etc.
By the way, I absolutely agree with Adam. You should spend an entire weekend (only one weekend) reading CF books and running sample code. See how they work. It will boost your CF skills!