fixes in double auth

This commit is contained in:
alejandro.campos@artica.es 2022-09-22 08:59:39 +02:00
parent b7bef2dd58
commit 76f7761373
4 changed files with 8 additions and 12 deletions

View File

@ -167,7 +167,7 @@ if (!$double_auth_enabled
resizable: true,
draggable: true,
modal: true,
title: "<?php echo __('Double autentication activation'); ?>",
title: "<?php echo __('Double authentication activation'); ?>",
overlay: {
opacity: 0.5,
background: "black"
@ -186,8 +186,6 @@ if (!$double_auth_enabled
}
})
.show();
// Don't allow close the dialog with X button
$('.ui-dialog-titlebar-close').css('display', 'none');
</script>
<?php

View File

@ -1874,7 +1874,7 @@ function show_double_auth_activation () {
resizable: true,
draggable: true,
modal: true,
title: "<?php echo __('Double autentication activation'); ?>",
title: "<?php echo __('Double authentication activation'); ?>",
overlay: {
opacity: 0.5,
background: "black"
@ -1952,7 +1952,7 @@ function show_double_auth_deactivation () {
resizable: true,
draggable: true,
modal: true,
title: "<?php echo __('Double autentication activation'); ?>",
title: "<?php echo __('Double authentication activation'); ?>",
overlay: {
opacity: 0.5,
background: "black"

View File

@ -512,6 +512,7 @@ if (isset($config['id_user']) === false) {
if ((!isset($double_auth_success)
|| !$double_auth_success)
&& is_double_auth_enabled($nick_in_db)
&& (bool) $config['double_auth_enabled'] === true
) {
// Store this values in the session to know if the user login
// was correct.

View File

@ -422,7 +422,7 @@ $timezone .= html_print_timezone_select('timezone', $user_info['timezone']).'</d
// Double auth.
$double_auth_enabled = (bool) db_get_value('id', 'tuser_double_auth', 'id_user', $config['id_user']);
if ($config['double_auth_enabled'] || ($config['double_auth_enabled'] == '' && $double_auth_enabled)) {
if ((bool) $config['double_auth_enabled'] === true) {
$double_authentication = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Double authentication').'</p>';
if (($config['2FA_all_users'] == '' && !$double_auth_enabled)
|| ($config['2FA_all_users'] != '' && !$double_auth_enabled)
@ -434,9 +434,6 @@ if ($config['double_auth_enabled'] || ($config['double_auth_enabled'] == '' && $
// Dialog.
$double_authentication .= '<div id="dialog-double_auth"class="invisible"><div id="dialog-double_auth-container"></div></div>';
}
if ($double_auth_enabled && $config['double_auth_enabled']) {
$double_authentication .= html_print_button(__('Show information'), 'show_info', false, 'javascript:show_double_auth_info();', '', true);
}
@ -1139,7 +1136,7 @@ function show_double_auth_activation () {
resizable: true,
draggable: true,
modal: true,
title: "<?php echo __('Double autentication activation'); ?>",
title: "<?php echo __('Double authentication activation'); ?>",
overlay: {
opacity: 0.5,
background: "black"
@ -1215,7 +1212,7 @@ function show_double_auth_deactivation () {
resizable: true,
draggable: true,
modal: true,
title: "<?php echo __('Double autentication activation'); ?>",
title: "<?php echo __('Double authentication activation'); ?>",
overlay: {
opacity: 0.5,
background: "black"