mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch '1329-Visualizar-auditoria-de-cambios-de-contraseña-Ext-4225-2' into 'develop'
Insert password changes by recover mail in system audit log - #1329 See merge request artica/pandorafms!1164
This commit is contained in:
commit
4b416e3af2
@ -236,8 +236,6 @@ if ($create_user) {
|
|||||||
case "postgresql":
|
case "postgresql":
|
||||||
$result = create_user($id, $password_new, $values);
|
$result = create_user($id, $password_new, $values);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_process_sql_insert ('tsesion', array('id_sesion' => '','id_usuario' => $id,'ip_origen' => $_SERVER['REMOTE_ADDR'],'accion' => 'Password change',
|
|
||||||
'descripcion' => 'Access password updated','fecha' => date("Y-m-d H:i:s"),'utimestamp' => time()));
|
|
||||||
$res = save_pass_history($id, $password_new);
|
$res = save_pass_history($id, $password_new);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -358,6 +356,8 @@ if ($update_user) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
db_process_sql_insert ('tsesion', array('id_sesion' => '','id_usuario' => $id,'ip_origen' => $_SERVER['REMOTE_ADDR'],'accion' => 'Password change',
|
||||||
|
'descripcion' => 'Access password update failed','fecha' => date("Y-m-d H:i:s"),'utimestamp' => time()));
|
||||||
ui_print_error_message (__('Passwords does not match'));
|
ui_print_error_message (__('Passwords does not match'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -583,6 +583,10 @@ if (! isset ($config['id_user'])) {
|
|||||||
if ($pass1 == $pass2) {
|
if ($pass1 == $pass2) {
|
||||||
$res = update_user_password ($id_user, $pass1);
|
$res = update_user_password ($id_user, $pass1);
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
|
||||||
|
db_process_sql_insert ('tsesion', array('id_sesion' => '','id_usuario' => $id_user,'ip_origen' => $_SERVER['REMOTE_ADDR'],'accion' => 'Reset change',
|
||||||
|
'descripcion' => 'Successful reset password process ','fecha' => date("Y-m-d H:i:s"),'utimestamp' => time()));
|
||||||
|
|
||||||
$correct_reset_pass_process = __('Password changed successfully');
|
$correct_reset_pass_process = __('Password changed successfully');
|
||||||
|
|
||||||
register_pass_change_try($id_user, 1);
|
register_pass_change_try($id_user, 1);
|
||||||
@ -675,6 +679,7 @@ if (! isset ($config['id_user'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
$cod_hash = $user_reset_pass . "::::" . md5(rand(10, 1000000) . rand(10, 1000000) . rand(10, 1000000));
|
$cod_hash = $user_reset_pass . "::::" . md5(rand(10, 1000000) . rand(10, 1000000) . rand(10, 1000000));
|
||||||
|
|
||||||
$subject = '[Pandora] '.__('Reset password');
|
$subject = '[Pandora] '.__('Reset password');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user