• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

onRequestStart

Engaged ,
Jun 12, 2013 Jun 12, 2013

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

Views

666

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 12, 2013 Jun 12, 2013

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 12, 2013 Jun 12, 2013

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,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 12, 2013 Jun 12, 2013

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 12, 2013 Jun 12, 2013

Copy link to clipboard

Copied

How cool. It censored my usage of "sh!t".

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 12, 2013 Jun 12, 2013

Copy link to clipboard

Copied

LATEST

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation