报名问题

dev_aliyun
daiao 5 years ago
parent bd44bb9e5a
commit d50486693b

@ -378,7 +378,7 @@ class AccountController < ApplicationController
us = UsersService.new us = UsersService.new
@user = us.register user_params.merge(:should_confirmation_password => false) @user = us.register user_params.merge(:should_confirmation_password => false)
# 注册时,记录是否是引流用户 # 注册时,记录是否是引流用户
ip = @env['HTTP_X_REAL_IP'] ip = request.remote_ip
ua = UserAgent.find_by_id(:ip => ip) ua = UserAgent.find_by_id(:ip => ip)
ua.update_column(:type, UserAgent::REGISTER) if ua ua.update_column(:type, UserAgent::REGISTER) if ua
if !@user.new_record? if !@user.new_record?

@ -348,7 +348,7 @@ class CompetitionTeamsController < ApplicationController
def record_agent_user_action def record_agent_user_action
# 注册时,记录是否是引流用户 # 注册时,记录是否是引流用户
ip = @env['HTTP_X_REAL_IP'] ip = request.remote_ip
ua = UserAgent.find_by_id(:ip => ip) ua = UserAgent.find_by_id(:ip => ip)
ua.update_column(:type, UserAgent::COMPETITION) if ua ua.update_column(:type, UserAgent::COMPETITION) if ua
end end

Loading…
Cancel
Save