Add users index on unconfirmed_email (#25672)

This commit is contained in:
Claire authored and GitHub committed 2023-07-02 19:41:35 +02:00
1 parent 933ba1a3eb
commit e6a8faae81
2 files changed
+2 -19

No files matched your search

@@ -28,24 +28,6 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
resource.email = current_user.unconfirmed_email || current_user.email if user_signed_in?
end
def create
# Since we don't allow users to request confirmation emails for other accounts when they
# are already logged in, so we can cut on the expensive queries by simply reusing the
# current user.
if user_signed_in?
self.resource = current_user
resource.send_confirmation_instructions
else
self.resource = current_user || User.send_confirmation_instructions(resource_params)
end
if successfully_sent?(resource)
respond_with({}, location: after_resending_confirmation_instructions_path_for(resource_name))
else
respond_with(resource)
end
end
def confirm_captcha
check_captcha! do |message|
flash.now[:alert] = message