From f4f0b3f0fe69f035c34381fc9d8c414212f896a9 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 12 Jan 2025 17:06:27 +0530 Subject: [PATCH] add: `userType`to audit data. --- src/Appwrite/Platform/Workers/Audits.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Audits.php b/src/Appwrite/Platform/Workers/Audits.php index 86ca59d3fd..2c1cb488ad 100644 --- a/src/Appwrite/Platform/Workers/Audits.php +++ b/src/Appwrite/Platform/Workers/Audits.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Workers; +use Appwrite\Auth\Auth; use Exception; use Throwable; use Utopia\Audit\Audit; @@ -60,6 +61,7 @@ class Audits extends Action $userName = $user->getAttribute('name', ''); $userEmail = $user->getAttribute('email', ''); + $userType = $user->getAttribute('type', Auth::AUDIT_TYPE_USER); $audit = new Audit($dbForProject); $audit->log( @@ -74,6 +76,7 @@ class Audits extends Action 'userId' => $user->getId(), 'userName' => $userName, 'userEmail' => $userEmail, + 'userType' => $userType, 'mode' => $mode, 'data' => $auditPayload, ]