mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-25 10:09:21 +00:00
Add password reset attempts to user logs (#7710)
* Add password reset attempts to user logs
This commit is contained in:
@@ -154,6 +154,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
//build the user log array
|
||||
$log_array['type'] = 'Password Reset';
|
||||
if (!empty($result)) {
|
||||
$log_array['domain_uuid'] = $result['domain_uuid'];
|
||||
$log_array['username'] = $result['username'];
|
||||
$log_array['user_uuid'] = $result['user_uuid'];
|
||||
$log_array['authorized'] = true;
|
||||
}
|
||||
else {
|
||||
$log_array["domain_uuid"] = $_SESSION["domain_uuid"];
|
||||
$log_array['authorized'] = false;
|
||||
}
|
||||
|
||||
//add the result to the user logs
|
||||
user_logs::add($log_array);
|
||||
|
||||
//always show the email sent message
|
||||
message::add($text['message-reset_link_sent'], 'positive', 2500);
|
||||
}
|
||||
@@ -229,6 +245,15 @@
|
||||
$database->execute($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
|
||||
//build the user log array
|
||||
$log_array['type'] = 'Password Changed';
|
||||
$log_array['domain_uuid'] = $_SESSION['valid_domain'];
|
||||
$log_array['username'] = $_SESSION['valid_username'];
|
||||
$log_array['authorized'] = $_SESSION['valid_reset'];
|
||||
|
||||
//add the result to the user logs
|
||||
user_logs::add($log_array);
|
||||
|
||||
//set the message to password reset completed
|
||||
message::add($text['message-password_reset'], 'positive', 2500);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user