diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 59178efde1..928b1d39a7 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -268,44 +268,43 @@ echo ''; echo '
'.$pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '') . '
'; echo ''; -if ($mail != "") { - if ($process_error_message == '') { - echo '
'; - echo '
'; - echo '
'; - echo html_print_image('images/icono_logo_pandora.png', true, array("alt" => __('Password reset'), "border" => 0)); +if ($process_error_message == '') { + echo '
'; + echo '
'; + echo '
'; + echo html_print_image('images/icono_logo_pandora.png', true, array("alt" => __('Password reset'), "border" => 0)); + echo '
'; + echo '
'; + echo '
'; + echo '

' . __('INFO') . '

'; + echo '

' . __('An email has been sent to the user\'s address') . '

'; echo '
'; - echo '
'; - echo '
'; - echo '

' . __('INFO') . '

'; - echo '

' . __('An email has been sent to the user\'s address') . '

'; - echo '
'; - echo '
'; - html_print_submit_button("Ok", 'reset_correct_button', false); - echo '
'; + echo '
'; + html_print_submit_button("Ok", 'reset_correct_button', false); echo '
'; echo '
'; echo '
'; - } - else { - echo '
'; - echo '
'; - echo '
'; - echo html_print_image('images/icono_stop.png', true, array("alt" => __('Password reset'), "border" => 0)); - echo '
'; - echo '
'; - echo '
'; - echo '

' . __('ERROR') . '

'; - echo '

' . $process_error_message . '

'; - echo '
'; - echo '
'; - html_print_submit_button("Ok", 'reset_correct_button', false); - echo '
'; - echo '
'; - echo '
'; - echo '
'; - } + echo '
'; } +else { + echo '
'; + echo '
'; + echo '
'; + echo html_print_image('images/icono_stop.png', true, array("alt" => __('Password reset'), "border" => 0)); + echo '
'; + echo '
'; + echo '
'; + echo '

' . __('ERROR') . '

'; + echo '

' . $process_error_message . '

'; + echo '
'; + echo '
'; + html_print_submit_button("Ok", 'reset_correct_button', false); + echo '
'; + echo '
'; + echo '
'; + echo '
'; +} + if ($correct_reset_pass_process != "") { echo '
'; diff --git a/pandora_console/index.php b/pandora_console/index.php index dda5f86077..8fa41224a4 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -550,7 +550,7 @@ if (! isset ($config['id_user'])) { if ($config['enterprise_installed']) { enterprise_include_once ('include/functions_reset_pass.php'); } - + $correct_pass_change = (boolean)get_parameter('correct_pass_change', 0); $reset = (boolean)get_parameter('reset', 0); $first = (boolean)get_parameter('first', 0); @@ -588,7 +588,7 @@ if (! isset ($config['id_user'])) { if ($db_reset_pass_entry) { if (($db_reset_pass_entry + SECONDS_2HOUR) < time()) { - $process_error_message = __('This user has not requested a password change'); + $process_error_message = __('Too much time since password change request'); delete_reset_pass_entry($id_user); require_once ('general/login_page.php'); } @@ -598,7 +598,7 @@ if (! isset ($config['id_user'])) { } } else { - $process_error_message = __('Too much time since password change request'); + $process_error_message = __('This user has not requested a password change'); require_once ('general/login_page.php'); } } diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 2a1bded331..20197a9c4c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2926,3 +2926,11 @@ create table IF NOT EXISTS `tphase`( `timeout` int unsigned default null, PRIMARY KEY (`phase_id`,`transaction_id`) ) engine=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `treset_pass` ( + `id` bigint(10) unsigned NOT NULL auto_increment, + `id_user` varchar(100) NOT NULL default '', + `cod_hash` varchar(100) NOT NULL default '', + `reset_time` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8;