Add remaning attemps

Former-commit-id: 07960eaa4b3281ee13f14b0fc5249b94ac0626fa
This commit is contained in:
marcos.alconada 2019-04-24 16:49:04 +02:00
parent e543b64833
commit 43d8a25c39
1 changed files with 6 additions and 0 deletions

View File

@ -376,6 +376,9 @@ if (isset($correct_reset_pass_process)) {
}
if (isset($login_failed)) {
$nick = get_parameter_post('nick');
$fails = db_get_value('failed_attempt', 'tusuario', 'id_user', $nick);
$attemps = ($config['number_attempts'] - $fails);
echo '<div id="login_failed" title="'.__('Login failed').'">';
echo '<div class="content_alert">';
echo '<div class="icon_message_alert">';
@ -386,6 +389,9 @@ if (isset($login_failed)) {
echo '<h1>'.__('ERROR').'</h1>';
echo '<p>'.$config['auth_error'].'</p>';
echo '</div>';
echo '<div class="text_message_alert">';
echo '<p><bold>Remaining attempts: '.$attemps.'</p><bold>';
echo '</div>';
echo '<div class="button_message_alert">';
html_print_submit_button('Ok', 'hide-login-error', false);
echo '</div>';