Added support for two-step authentication. The login function will
now email a 6-digit code to users if the user is part of a group with role 'web2py TWo-Step Authentication'.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
|
||||
<div id="web2py_user_form">
|
||||
{{
|
||||
if request.args(0)=='login':
|
||||
if request.args(0)=='login' and not session.auth_2_factor_user:
|
||||
if not 'register' in auth.settings.actions_disabled:
|
||||
form.add_button(T('Register'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn')
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user