Email Verification for Imported Accounts #457
i-h8-github
started this conversation in
General
Replies: 2 comments 15 replies
-
Assuming you imported the accounts with unverified status, try this patch: diff --git a/lib/rodauth/features/verify_account.rb b/lib/rodauth/features/verify_account.rb
index a27b857..f5e3b5c 100644
--- a/lib/rodauth/features/verify_account.rb
+++ b/lib/rodauth/features/verify_account.rb
@@ -60,6 +60,7 @@ module Rodauth
)
internal_request_method(:verify_account_resend)
+ internal_request_method(:setup_account_verification)
internal_request_method
route(:verify_account_resend) do |r| And this code: require 'rodauth'
rodauth = Rodauth.lib do
enable :verify_account
# other rodauth configuration here
end
DB[:accounts].select_order_map(:id).each do |id|
rodauth.setup_account_verification(account_id: id)
end If that works, I can commit the patch. I haven't tried it, so it may not work. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Now we are at:
I'm not sure exactly what I'm intended to set for what I assume is the |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am migrating an old WordPress site to Roda/Sequel/Rodauth, and I have to migrate a bunch of user accounts. In the process, I'd like to enforce email verification and password resets for these old accounts to weed out the many, many bots.
I was sort of hoping that merely importing the usernames/email addresses to the
accounts
table would allow the framework to gracefully handle the rest by virtue of no other information being present in the database, but unfortunately that is not so. The first roadblock is that email verification cannot be enforced because the system is unable to "resend" a verification email that it never sent in the first place.Is there any advice on the best way to accomplish this?
Thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions