We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50352f2 commit 745b73cCopy full SHA for 745b73c
1 file changed
interface/web/login/otp.php
@@ -105,6 +105,8 @@
105
//* 2fa success
106
if($_POST['code'] == $_SESSION['otp']['code']) {
107
$_SESSION['s'] = $_SESSION['s_pending'];
108
+ // Reset the attempt counter.
109
+ $app->db->query('UPDATE `sys_user` SET otp_attempts=0 WHERE userid = ?', $_SESSION['s']['user']['userid']);
110
unset($_SESSION['s_pending']);
111
unset($_SESSION['otp']);
112
header('Location: ../index.php');
@@ -185,6 +187,7 @@
185
187
$csrf_token = $app->auth->csrf_token_get('language_edit');
186
188
$app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
189
$app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
190
+#$app->tpl->setVar('msg', print_r($_SESSION['otp'], 1));
191
192
193
require ISPC_ROOT_PATH.'/web/login/lib/lang/'.$app->functions->check_language($conf['language']).'.lng';
0 commit comments