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

Failed Login Script

Participant ,
Feb 24, 2007 Feb 24, 2007

Copy link to clipboard

Copied

Hello, I am trying to create a failed login script. I am setting the variable in the session scope but I am not quite sure how to get the count process going correctly. After 3 trys I want to lock the person out. I am using cflogin in my application.cfm file. Can someone please help me with the logic of this.

Here is my code.
TOPICS
Advanced techniques

Views

397

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

correct answers 1 Correct answer

Participant , Feb 24, 2007 Feb 24, 2007
In your app file where you redirect the user back to login.cfm if their username and pass dont match with the one in db, place a <cfparam name="Session.FailCount" default="1">
<cfset session.FailCount=Session.FailCount +1>
<cfif session.FailCount is 3>
your msg: You have exceed the 3 trials....etc
</cfif>

You can submit your msh as a url variable to the login page

Votes

Translate

Translate
Participant ,
Feb 24, 2007 Feb 24, 2007

Copy link to clipboard

Copied

In your app file where you redirect the user back to login.cfm if their username and pass dont match with the one in db, place a <cfparam name="Session.FailCount" default="1">
<cfset session.FailCount=Session.FailCount +1>
<cfif session.FailCount is 3>
your msg: You have exceed the 3 trials....etc
</cfif>

You can submit your msh as a url variable to the login page

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
Participant ,
Feb 25, 2007 Feb 25, 2007

Copy link to clipboard

Copied

LATEST
Thanks for the suggestion it worked nicely. Here is what my finished code looks like.

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