• Post Reply Bookmark Topic Watch Topic
  • New Topic

Counting tries  RSS feed

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to count the login tries and want to banned user after 3 wrong tries for 15 minutes

Thanks & best regards
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sounds straightforward... What's the question, BTW?

Henry
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
Sounds straightforward... What's the question, BTW?

Henry


when user is giving wrong password then how can I count his wrong tries for a specific user

Thanks again & best regards
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Farakh khan wrote:
when user is giving wrong password then how can I count his wrong tries for a specific user

Thanks again & best regards


Well, what do you have available for holding the count? A class variable? A file? A database? A session object?

Henry
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and what is the context here?
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pete stein wrote:and what is the context here?


Sorry, my english is not too good. Can you please get me any example?

Thanks again & best regards
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Farakh khan wrote:
pete stein wrote:and what is the context here?


Sorry, my english is not too good. Can you please get me any example?

Thanks again & best regards


He is asking "what are you doing?". There is a reason why you can't just store the count in a variable -- and it would help to know this, because maybe we can guide you to what resources are available in the environment that you are using.

Henry
 
Kumar Kamlesh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a session variable for this purpose would be straight forward, but what if a user closes the session after two wrong attempts within 15 minutes. And he tries the third wrong attempt in a new session. So it depends upon the design of your application as to how you want to handle this. May be using a database variable would do (as suggested above) if your design permits you. There can be other ways too.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!