it seems that the refresh login page, is count as login_onfail and
login_onvalidation in web2py default user login form.
e.g.
*models/db.py*
def login_attempts():
session.login_attempts = (session.login_attempts or 0) + 1
if session.login_attempts >= 3 :
#cache.ram('login_attempts', lambda: session.login_attempts, time_expire =
5)
response.flash = session.login_attempts
#auth.settings.login_onfail = login_attempts()
auth.settings.login_onvalidation = [login_attempts()]
*views/default/user.html add response toolbar*
{{=response.toolbar()}}
1. when i hit refresh https://127.0.0.1/test/default/user/login, the
session is added by 1
2. when i try to input the wrong login, the sessions added by 2 (1 added by
failure, n 1 added by refreshing the login form, i guess)
trying to use login_onfail and login_onvalidation got the same result.
is it normal behaviour, or i have the wrong steps?
thanks and best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.