diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 90e2d3a62..9c9d7411c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -14,8 +14,7 @@ class UsersController < ApplicationController # 贴吧获取用户信接口 def get_user_info begin - @user = User.find(12) - # @user = current_user + @user = current_user # TODO 等消息上线再打开注释 #@tidding_count = unviewed_tiddings(current_user) if current_user.present? @course = @@ -55,8 +54,7 @@ class UsersController < ApplicationController # Redo: 消息总数缓存 def get_navigation_info @old_domain = edu_setting('old_edu_host') - # @user = current_user - @user = User.find(12) + @user = current_user # 新消息数 @new_message = @user.tidings.where("created_at > '#{@user.click_time}'").count > 0 || @user.private_messages.where("created_at > '#{@user.click_time}'").count > 0