试用的用户可以不用完善资料

dev_forum
daiao 5 years ago
parent 66bef13e5c
commit 44561b8a51

@ -184,14 +184,13 @@ class ApplicationController < ActionController::Base
end end
# 系统全局认证 # 系统全局认证
#
def check_auth def check_auth
if !current_user.profile_completed? if current_user.certification != 1
info_url = '/account/profile'
tip_exception(402, info_url)
elsif current_user.certification != 1
day_cer = UserDayCertification.find_by(user_id: current_user.id) day_cer = UserDayCertification.find_by(user_id: current_user.id)
tip_exception(407, "系统未授权") unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400 tip_exception(407, "系统未授权") unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400
elsif !current_user.profile_completed?
info_url = '/account/profile'
tip_exception(402, info_url)
end end
end end

Loading…
Cancel
Save