From 8d3b674321fe4aa59e3f5150e859c007af9e7aa1 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 4 Nov 2021 14:14:11 +0800 Subject: [PATCH] FIX viri code invalid bug --- app/forms/accounts/reset_password_form.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/forms/accounts/reset_password_form.rb b/app/forms/accounts/reset_password_form.rb index 7f3442220..a451d13c2 100644 --- a/app/forms/accounts/reset_password_form.rb +++ b/app/forms/accounts/reset_password_form.rb @@ -17,11 +17,10 @@ module Accounts db_verifi_code = if type == 1 check_phone_format(login) - VerificationCode.where(phone: login, code: code, code_type: 1).last + VerificationCode.where(phone: login, code: code, code_type: 2).last elsif type == 0 - Rails.logger.info "9999999999 #{login}" check_email_format(login) - VerificationCode.where(email: login, code: code, code_type: 8).last + VerificationCode.where(email: login, code: code, code_type: 3).last end check_password(password)