Fix email validate.
This commit is contained in:
parent
1aa6f9c109
commit
ad256f93c5
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue