Rails 3 Devise: How to send validation e-mail to other e-mail
Before I accept an user registration I first need to validate it. The way I want to do this is to send an e-mail to the user saying we are validating it and send an e-mail to an admin with the user information and validation link.
When a开发者_开发问答nd if the admin clicks the validation links, the user will receive a confirmation e-mail and will be able to login.
I've already changed active? in user.rb so it only logins if the account is active.
Is there a how-to do this using devise?
Thank you.
You probably want to change the Devise::Mailer and blind copy the admin on the registration email. Include sufficient information in the registration email that the admin knows who the user is of course and can enable the account on behalf of the user.
Have a look a the devise gem and the mailer inside it.
I assume you've already added the confirmable devise module.
To answer your question very specifically, i'm not sure i know of a how-to for exactly your requirement.
精彩评论