From f1e3e935af74435f565c41a459b5b459ba9d18aa Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Wed, 18 Nov 2020 10:25:44 +0800 Subject: [PATCH] FIX check email exists for register --- app/controllers/accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 293af138..a4f5872a 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -134,7 +134,7 @@ class AccountsController < ApplicationController uid_logger("start register: verifi_code is #{verifi_code}, code is #{code}, time is #{Time.now.to_i - verifi_code.try(:created_at).to_i}") # check_code = (verifi_code.try(:code) == code.strip && (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60) # todo 上线前请删除万能验证码"513231" - + return normal_status(-1, "该邮箱已注册") if User.exists?(mail: params[:login]) return normal_status(-1, "邮箱格式错误") unless params[:login] =~ CustomRegexp::EMAIL return normal_status(-1, "8~16位密码,支持字母数字和符号") unless params[:password] =~ CustomRegexp::PASSWORD