开发者

Rails 3 Devise: How to send validation e-mail to other e-mail

开发者 https://www.devze.com 2023-02-01 06:03 出处:网络
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 in

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消