Verified Commit 29ef4521 authored by Helmo's avatar Helmo
Browse files

Print that we sent an email

parent 62e64493
......@@ -35,5 +35,6 @@ $wb['lost_password_function_denied_txt'] = 'This activation link is not valid.';
$wb['otp_code_txt'] = 'Two Factor Authentication';
$wb['otp_code_desc_txt'] = 'Enter the code you got from your authenticator app or via email.';
$wb['otp_code_placeholder_txt'] = 'OTP code';
$wb['otp_code_email_sent_txt'] = 'An email was sent to';
$wb['otp_code_resend_txt'] = 'Request new code';
?>
......@@ -55,6 +55,7 @@ if(count($_POST) >= 1) {
$app->auth->csrf_token_check();
}
require ISPC_ROOT_PATH.'/web/login/lib/lang/'.$app->functions->check_language($conf['language']).'.lng';
function finish_2fa_success($msg = '') {
global $app;
......@@ -162,6 +163,7 @@ if($_SESSION['otp']['type'] == 'email') {
} else {
$_SESSION['otp']['sent']++;
}
$token_sent_message = $wb['otp_code_email_sent_txt'] . ' ' . $email_to;
}
......@@ -183,7 +185,9 @@ if($logo['custom_logo'] != ''){
$app->tpl->setVar('base64_logo_txt', $base64_logo_txt);
$app->tpl->setVar('current_theme', isset($_SESSION['s']['theme']) ? $_SESSION['s']['theme'] : 'default', true);
if (!empty($token_sent_message)) {
$app->tpl->setVar('token_sent_message', $token_sent_message);
}
//* Load templating system and lang file
$app->uses('tpl');
......@@ -197,7 +201,6 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
$app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
//$app->tpl->setVar('msg', print_r($_SESSION['otp'], 1)); // For DEBUG only.
require ISPC_ROOT_PATH.'/web/login/lib/lang/'.$app->functions->check_language($conf['language']).'.lng';
$app->tpl->setVar($wb);
$app->tpl_defaults();
......
......@@ -14,6 +14,7 @@
<div class="right">
<input class="btn btn-default formbutton-default" type="submit" value="{tmpl_var name='login_button_txt'}">
</div>
<tmpl_if name="token_sent_message">{tmpl_var name='token_sent_message'}<br /></tmpl_if>
<a href="otp.php?action=resend">{tmpl_var name='otp_code_resend_txt'}</a>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment