diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 98dd577a1..d9b6f5b6b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -215,7 +215,7 @@ class ApplicationController < ActionController::Base return if params[:controller] == "main" # Find the current user User.current = find_current_user - uid_logger("user_step: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous")) + uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous")) if !User.current.logged? && Rails.env.development? User.current = User.find 12 diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index e47064e24..499bd0aa4 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -118,7 +118,6 @@ class ShixunsController < ApplicationController #@fans_count = owner.followers.count #@followed_count = owner.followed_users.count @user_own_shixuns = owner.shixuns.published.count - uid_logger_error("777777777777777777") end # 排行榜 diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d65675aac..90e2d3a62 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -14,8 +14,8 @@ class UsersController < ApplicationController # 贴吧获取用户信接口 def get_user_info begin - @user = current_user - uid_logger_error("############{@user.id}") + @user = User.find(12) + # @user = current_user # TODO 等消息上线再打开注释 #@tidding_count = unviewed_tiddings(current_user) if current_user.present? @course = @@ -55,7 +55,8 @@ class UsersController < ApplicationController # Redo: 消息总数缓存 def get_navigation_info @old_domain = edu_setting('old_edu_host') - @user = current_user + # @user = current_user + @user = User.find(12) # 新消息数 @new_message = @user.tidings.where("created_at > '#{@user.click_time}'").count > 0 || @user.private_messages.where("created_at > '#{@user.click_time}'").count > 0