Fix email validate.

This commit is contained in:
chiu 2024-10-11 05:15:41 +00:00
parent 1aa6f9c109
commit ad256f93c5
1 changed files with 1 additions and 3 deletions

View File

@ -297,10 +297,8 @@ class AsksController < ApplicationController
else else
referer_url = nil referer_url = nil
end end
if (ask_setting.validate_enable || @must_verify_email) && AskSafeEmail.where(:email=> @ask_question.mail).count == 0 if @must_verify_email || (ask_setting.validate_enable && AskSafeEmail.where(:email=> @ask_question.mail).count == 0)
build_verification_email(@ask_question, referer_url) build_verification_email(@ask_question, referer_url)
elsif @must_verify_email
redirect_to referer_url and return
else else
@ask_question.update(:situation => AskTicketStatus::DefaultKeys[1]) @ask_question.update(:situation => AskTicketStatus::DefaultKeys[1])
build_email(@ask_question) build_email(@ask_question)