fixes in double auth
This commit is contained in:
parent
b7bef2dd58
commit
76f7761373
|
@ -167,7 +167,7 @@ if (!$double_auth_enabled
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
modal: true,
|
modal: true,
|
||||||
title: "<?php echo __('Double autentication activation'); ?>",
|
title: "<?php echo __('Double authentication activation'); ?>",
|
||||||
overlay: {
|
overlay: {
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
background: "black"
|
background: "black"
|
||||||
|
@ -186,8 +186,6 @@ if (!$double_auth_enabled
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.show();
|
.show();
|
||||||
// Don't allow close the dialog with X button
|
|
||||||
$('.ui-dialog-titlebar-close').css('display', 'none');
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1874,7 +1874,7 @@ function show_double_auth_activation () {
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
modal: true,
|
modal: true,
|
||||||
title: "<?php echo __('Double autentication activation'); ?>",
|
title: "<?php echo __('Double authentication activation'); ?>",
|
||||||
overlay: {
|
overlay: {
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
background: "black"
|
background: "black"
|
||||||
|
@ -1952,7 +1952,7 @@ function show_double_auth_deactivation () {
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
modal: true,
|
modal: true,
|
||||||
title: "<?php echo __('Double autentication activation'); ?>",
|
title: "<?php echo __('Double authentication activation'); ?>",
|
||||||
overlay: {
|
overlay: {
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
background: "black"
|
background: "black"
|
||||||
|
|
|
@ -512,6 +512,7 @@ if (isset($config['id_user']) === false) {
|
||||||
if ((!isset($double_auth_success)
|
if ((!isset($double_auth_success)
|
||||||
|| !$double_auth_success)
|
|| !$double_auth_success)
|
||||||
&& is_double_auth_enabled($nick_in_db)
|
&& 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
|
// Store this values in the session to know if the user login
|
||||||
// was correct.
|
// was correct.
|
||||||
|
|
|
@ -422,7 +422,7 @@ $timezone .= html_print_timezone_select('timezone', $user_info['timezone']).'</d
|
||||||
// Double auth.
|
// Double auth.
|
||||||
$double_auth_enabled = (bool) db_get_value('id', 'tuser_double_auth', 'id_user', $config['id_user']);
|
$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>';
|
$double_authentication = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Double authentication').'</p>';
|
||||||
if (($config['2FA_all_users'] == '' && !$double_auth_enabled)
|
if (($config['2FA_all_users'] == '' && !$double_auth_enabled)
|
||||||
|| ($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.
|
// Dialog.
|
||||||
$double_authentication .= '<div id="dialog-double_auth"class="invisible"><div id="dialog-double_auth-container"></div></div>';
|
$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);
|
$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,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
modal: true,
|
modal: true,
|
||||||
title: "<?php echo __('Double autentication activation'); ?>",
|
title: "<?php echo __('Double authentication activation'); ?>",
|
||||||
overlay: {
|
overlay: {
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
background: "black"
|
background: "black"
|
||||||
|
@ -1215,7 +1212,7 @@ function show_double_auth_deactivation () {
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
modal: true,
|
modal: true,
|
||||||
title: "<?php echo __('Double autentication activation'); ?>",
|
title: "<?php echo __('Double authentication activation'); ?>",
|
||||||
overlay: {
|
overlay: {
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
background: "black"
|
background: "black"
|
||||||
|
|
Loading…
Reference in New Issue