X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/feef62b1cc1a8461842864c74394decf83df71a7..7f556f94f1d479346cbefb5cbeec0a6a0b7b8547:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e22f64c76..3506b4196 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base def authorize_web if session[:user] - @user = User.where(:status => ["active", "confirmed", "suspended"]).find(session[:user]) + @user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first if @user.status == "suspended" session.delete(:user)