Audit trail uses username

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
crash
User
Posts: 151

Audit trail uses username

Post 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


MichaelG
User
Posts: 1110

Post by MichaelG »

Uncheck Tools -> Advanced Settings -> Log user ID instead of user name


crash
User
Posts: 151

Post by crash »

Did this and it still records the Username in the User field when the action is autologin.


MichaelG
User
Posts: 1110

Post 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());

Post Reply