Page 1 of 1
Audit trail uses username
Posted: Fri Mar 08, 2024 5:29 am
by crash
The audit trail the audit table captures the User ID.... but I've noticed that any user that has used auto login it captures their username instead of the User ID.
This only happens with auto login.
Any way to fix this.
Thanks
Re: Audit trail uses username
Posted: Fri Mar 08, 2024 6:57 am
by MichaelG
Uncheck Tools -> Advanced Settings -> Log user ID instead of user name
Re: Audit trail uses username
Posted: Wed Mar 20, 2024 5:58 am
by crash
Did this and it still records the Username in the User field when the action is autologin.
Re: Audit trail uses username
Posted: Wed Mar 20, 2024 7:27 am
by MichaelG
It seemed that currently autologin always log the user name in the audit trail. You can search for and modify the following codes in the "AutoLoginAsync" method of the "Models/src/AdvancedSecurityBase.cs":
if (valid)
await WriteAuditLogAsync(model.Username, Language.Phrase("AuditTrailAutoLogin"), CurrentUserIpAddress());