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