Skip to main content
Inspiring
June 12, 2013
Question

onRequestStart

  • June 12, 2013
  • 2 replies
  • 903 views

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

    This topic has been closed for replies.

    2 replies

    p_sim
    Participating Frequently
    June 13, 2013

    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!

    Inspiring
    June 12, 2013

    Generally speaking, a user would only login once per SESSION, so you'd have that sort of thing in onSessionStart(), not onRequestStart().

    --

    Adam

    iccsiAuthor
    Inspiring
    June 12, 2013

    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,

    Inspiring
    June 12, 2013

    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