diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index aa532de7aa47c30a11086dcbca891527c54c867d..685d41a55205eece7fe16bc0a9fa980797faa187 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -4,7 +4,6 @@ class ApplicationController < ActionController::Base
   before_filter :authenticate_user!
   before_filter :reject_blocked!
   before_filter :check_password_expiration
-  around_filter :set_current_user_for_thread
   before_filter :add_abilities
   before_filter :ldap_security_check
   before_filter :dev_tools if Rails.env == 'development'
@@ -53,15 +52,6 @@ class ApplicationController < ActionController::Base
     end
   end
 
-  def set_current_user_for_thread
-    Thread.current[:current_user] = current_user
-    begin
-      yield
-    ensure
-      Thread.current[:current_user] = nil
-    end
-  end
-
   def abilities
     @abilities ||= Six.new
   end
diff --git a/app/observers/base_observer.rb b/app/observers/base_observer.rb
index d685bd5d819cdbbd504fce72ff07563d6c7ffa1e..260d1f05db302301d651b845af915ced0696c8bd 100644
--- a/app/observers/base_observer.rb
+++ b/app/observers/base_observer.rb
@@ -10,12 +10,4 @@ class BaseObserver < ActiveRecord::Observer
   def log_info message
     Gitlab::AppLogger.info message
   end
-
-  def current_user
-    Thread.current[:current_user]
-  end
-
-  def current_commit
-    Thread.current[:current_commit]
-  end
 end
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 654c1f62c6c0f53d862f7f1e3f6a37ebfb171506..b6a5806d64605c2e5866d450f900553a1fb4fc7f 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -36,16 +36,6 @@ module API
       end
     end
 
-    def set_current_user_for_thread
-      Thread.current[:current_user] = current_user
-
-      begin
-        yield
-      ensure
-        Thread.current[:current_user] = nil
-      end
-    end
-
     def user_project
       @project ||= find_project(params[:id])
       @project || not_found!
diff --git a/lib/gitlab/seeder.rb b/lib/gitlab/seeder.rb
index 39de1223b1866e88db355f2a0c9e66acc3eb0c5b..31aa3528c4c37a4aa4416da61e6d0df01368b9c0 100644
--- a/lib/gitlab/seeder.rb
+++ b/lib/gitlab/seeder.rb
@@ -9,12 +9,7 @@ module Gitlab
     end
 
     def self.by_user(user)
-      begin
-        Thread.current[:current_user] = user
-        yield
-      ensure
-        Thread.current[:current_user] = nil
-      end
+      yield
     end
 
     def self.mute_mailer