Merge branch 'master' into 'master'
添加系统认证功能 注册用户需要认证 See merge request !3
This commit is contained in:
commit
dfcdadc722
|
|
@ -61,18 +61,18 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
# 判断用户是否认证
|
||||
# def check_authentication
|
||||
# # return true
|
||||
# if params[:action] == "on_search" || params[:action] == "apply_trail" # 之所以这样处理是为了避开account页面ajax加载
|
||||
# return true
|
||||
# end
|
||||
# authentication = ApplyAction.where(:user_id => User.current.id, :status => 1).first
|
||||
# user_identity = User.current.try(:user_extensions).try(:identity)
|
||||
# if user_identity.blank? || authentication.blank?
|
||||
# redirect_to my_account_path
|
||||
# return
|
||||
# end
|
||||
# end
|
||||
def check_authentication
|
||||
# return true
|
||||
if params[:action] == "on_search" || params[:action] == "apply_trail" # 之所以这样处理是为了避开account页面ajax加载
|
||||
return true
|
||||
end
|
||||
authentication = ApplyAction.where(:user_id => User.current.id, :status => 1).first
|
||||
user_identity = User.current.try(:user_extensions).try(:identity)
|
||||
if user_identity.blank? || authentication.blank?
|
||||
redirect_to my_account_path
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
def session_expiration
|
||||
if session[:user_id]
|
||||
|
|
|
|||
Loading…
Reference in New Issue