mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-22 16:38:28 +00:00
Fix user logs only saving the type as login (#7709)
Needs to use the result and default to login
This commit is contained in:
@@ -109,11 +109,10 @@ class user_logs {
|
||||
$array['user_logs'][0]["user_uuid"] = $result['user_uuid'];
|
||||
$array['user_logs'][0]["username"] = $result['username'];
|
||||
$array['user_logs'][0]["hostname"] = gethostname();
|
||||
$array['user_logs'][0]["type"] = 'login';
|
||||
$array['user_logs'][0]["type"] = $result['type'] ?? 'login';
|
||||
$array['user_logs'][0]["remote_address"] = $_SERVER['REMOTE_ADDR'];
|
||||
$array['user_logs'][0]["user_agent"] = $_SERVER['HTTP_USER_AGENT'];
|
||||
$array['user_logs'][0]["session_id"] = session_id();
|
||||
$array['user_logs'][0]["type"] = 'login';
|
||||
if ($result["authorized"]) {
|
||||
$array['user_logs'][0]["result"] = 'success';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user