]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Merge pull request #4313 from AntonKhorev/account-delete-delay
[rails.git] / app / controllers / application_controller.rb
index a30816a8ede740eaf3adf8f8be7165db0d23a193..c830d4bcd37bbce3177e80dd295cb4067bae8299 100644 (file)
@@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
 
   def authorize_web
     if session[:user]
-      self.current_user = User.where(:id => session[:user], :status => %w[active confirmed suspended]).first
+      self.current_user = User.find_by(:id => session[:user], :status => %w[active confirmed suspended])
 
       if session[:fingerprint] &&
          session[:fingerprint] != current_user.fingerprint