diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 66f987e1c49..05f850e30d9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -252,7 +252,7 @@ class ApplicationController < ActionController::Base username_lower = params[:username].downcase username_lower.gsub!(/\.json$/, '') find_opts = { username_lower: username_lower } - find_opts[:active] = true unless opts[:include_inactive] || current_user.staff? + find_opts[:active] = true unless opts[:include_inactive] || current_user.try(:staff?) User.find_by(find_opts) elsif params[:external_id] external_id = params[:external_id].gsub(/\.json$/, '')