--- controllers/application_controller.rb.orig 2011-09-20 04:15:14.000000000 +0000 +++ controllers/application_controller.rb 2011-09-20 05:10:17.000000000 +0000 @@ -58,6 +58,11 @@ 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