Added changes to reset password system
This commit is contained in:
parent
a1f23af142
commit
bfa3b43ee7
|
@ -268,44 +268,43 @@ echo '</div>';
|
|||
echo '<div id="ver_num">'.$pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '') . '</div>';
|
||||
echo '</div>';
|
||||
|
||||
if ($mail != "") {
|
||||
if ($process_error_message == '') {
|
||||
echo '<div id="reset_correct" title="' . __('Password reset') . '">';
|
||||
echo '<div class="content_alert">';
|
||||
echo '<div class="icon_message_alert">';
|
||||
echo html_print_image('images/icono_logo_pandora.png', true, array("alt" => __('Password reset'), "border" => 0));
|
||||
if ($process_error_message == '') {
|
||||
echo '<div id="reset_correct" title="' . __('Password reset') . '">';
|
||||
echo '<div class="content_alert">';
|
||||
echo '<div class="icon_message_alert">';
|
||||
echo html_print_image('images/icono_logo_pandora.png', true, array("alt" => __('Password reset'), "border" => 0));
|
||||
echo '</div>';
|
||||
echo '<div class="content_message_alert">';
|
||||
echo '<div class="text_message_alert">';
|
||||
echo '<h1>' . __('INFO') . '</h1>';
|
||||
echo '<p>' . __('An email has been sent to the user\'s address') . '</p>';
|
||||
echo '</div>';
|
||||
echo '<div class="content_message_alert">';
|
||||
echo '<div class="text_message_alert">';
|
||||
echo '<h1>' . __('INFO') . '</h1>';
|
||||
echo '<p>' . __('An email has been sent to the user\'s address') . '</p>';
|
||||
echo '</div>';
|
||||
echo '<div class="button_message_alert">';
|
||||
html_print_submit_button("Ok", 'reset_correct_button', false);
|
||||
echo '</div>';
|
||||
echo '<div class="button_message_alert">';
|
||||
html_print_submit_button("Ok", 'reset_correct_button', false);
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
else {
|
||||
echo '<div id="reset_correct" title="' . __('Password reset') . '">';
|
||||
echo '<div class="content_alert">';
|
||||
echo '<div class="icon_message_alert">';
|
||||
echo html_print_image('images/icono_stop.png', true, array("alt" => __('Password reset'), "border" => 0));
|
||||
echo '</div>';
|
||||
echo '<div class="content_message_alert">';
|
||||
echo '<div class="text_message_alert">';
|
||||
echo '<h1>' . __('ERROR') . '</h1>';
|
||||
echo '<p>' . $process_error_message . '</p>';
|
||||
echo '</div>';
|
||||
echo '<div class="button_message_alert">';
|
||||
html_print_submit_button("Ok", 'reset_correct_button', false);
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
else {
|
||||
echo '<div id="reset_correct" title="' . __('Password reset') . '">';
|
||||
echo '<div class="content_alert">';
|
||||
echo '<div class="icon_message_alert">';
|
||||
echo html_print_image('images/icono_stop.png', true, array("alt" => __('Password reset'), "border" => 0));
|
||||
echo '</div>';
|
||||
echo '<div class="content_message_alert">';
|
||||
echo '<div class="text_message_alert">';
|
||||
echo '<h1>' . __('ERROR') . '</h1>';
|
||||
echo '<p>' . $process_error_message . '</p>';
|
||||
echo '</div>';
|
||||
echo '<div class="button_message_alert">';
|
||||
html_print_submit_button("Ok", 'reset_correct_button', false);
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
if ($correct_reset_pass_process != "") {
|
||||
echo '<div id="final_process_correct" title="' . __('Password reset') . '">';
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue