Patch #9281 ยป loggable_usernames.patch
controllers/application_controller.rb 2011-09-20 05:10:17.000000000 +0000 | ||
---|---|---|
58 | 58 |
Setting.check_cache |
59 | 59 |
# Find the current user |
60 | 60 |
User.current = find_current_user |
61 | ||
62 |
# Enables logging usernames in apache access log |
|
63 |
if User.current.logged? |
|
64 |
response.headers["X-Username"] = User.current.name(:username) |
|
65 |
end |
|
61 | 66 |
end |
62 | 67 | |
63 | 68 |
# Returns the current user or nil if no user is logged in |