From 8bdf2a0c869dfad4f3db3a6a271bec12022eed41 Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:45:21 -0700 Subject: [PATCH] Fix user logs only saving the type as login (#7709) Needs to use the result and default to login --- core/user_logs/resources/classes/user_logs.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/user_logs/resources/classes/user_logs.php b/core/user_logs/resources/classes/user_logs.php index a90f4304ec..390486c968 100644 --- a/core/user_logs/resources/classes/user_logs.php +++ b/core/user_logs/resources/classes/user_logs.php @@ -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 {