add: userTypeto audit data.

This commit is contained in:
Darshan 2025-01-12 17:06:27 +05:30
parent e237f7c05d
commit f4f0b3f0fe

View file

@ -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,
]