NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: broche on April 13, 2014, 07:33:55 AM
-
Hi, Trying to track the number of login attempts by a user so that I can shut them out after more than 3 attempts.
Tried with a local variable Loc:Tries and added 1 each attempt but I'm sure I didn't do it the web way as it odesnt want to increment the variable.
Should I be setting a session variable in some way?
Any suggestions?
-
I think to actually lock someone out you would have to have a flag in their user record that indicates a lock out so that they cannot just go to a new browser and start up a new session. But to count your session attempts you would probably have to use a session variable to store those attempts.
-
>> Should I be setting a session variable in some way?
yes,
p_web.SSV('tries',p_web.GSV('tries')+1)
but of course this is only "tries this session". If they close the browser, and start again they'll get a new session, and hence 3 more tries.
If you want to count the tries across sessions then you'll need to add a field to your users table. But then you'll need some manual, or timed, reset so that a locked user can be unlocked.
Cheers
Bruce
-
Thanks all, I like the staff record idea.