NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: broche on April 13, 2014, 07:33:55 AM

Title: Login Attempts
Post 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?
Title: Re: Login Attempts
Post by: debzidoodle on April 13, 2014, 12:33:22 PM
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.
Title: Re: Login Attempts
Post by: Bruce on April 13, 2014, 10:59:34 PM
>> 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
Title: Re: Login Attempts
Post by: broche on April 14, 2014, 06:57:08 AM
Thanks all, I like the staff record idea.