One of my reports is returning the incorrect data for the user who made the last update. The report is showing the system user (or only the system admins) who made changes, and not the actual user. So if for example, John updated his password, but Jill is the actual system administrator who modified his acocunt, the report returns Jill as the person who made the changes last. As I am going through the stored procedures and triggers for this report, I realize that the following is prevalent throughout: System_user is in all of the statements. How can I change this so that the value of the current logged in user, and not the system admin are captured. Could I use current_user or is there another value that can be used?
Part of the Trigger Example
Part of the Trigger Example
Code:
Insert into commonEvents
(UserId, Login, Description)
VALUES
(@userId, system_user, @description)