diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8981a0995..0c134a3bd 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -715,7 +715,7 @@ class ApplicationController < ActionController::Base end def find_user_with_id - @user = User.find_by_id params[:user_id] + @user = User.find_by(type: 'User', id: params[:user_id]) # render_not_found("未找到’#{params[:login]}’相关的用户") unless @user render_error("未找到相关的用户") unless @user end