Delay and or resend Devise's confirmation email for manually created users

I'm using Devise to allow user signup as-well-as using my own user admin to create users manually. When I create a user in the admin, Devise sends a confirmation immediately to the new user. I believe this is due to the fact that both devise and my admin use the same model. How do I delay this email until the administrator is ready to send it?

Additionally, Devise's validation is requiring the admin set a password for the new user. I would much prefer the manually created users specify their own password when they respond the confirmation. Right now manually created users will not know their password unless I send it too them in a supplemental email.

Answers


We do this in one of our apps. You can tell Devise NOT to automatically deliver the confirmation like this:

@user.skip_confirmation!

And then later, you can do

Devise::Mailer.confirmation_instructions(@user).deliver

For Rails 2.x you'd do something like:

DeviseMailer.deliver_confirmation_instructions(@user)

Need Your Help

How do you add a background image for printing in IE/FF?

css internet-explorer firefox printing background-image

In other topics I've found that IE/FF doesn't print background images by default. Now that's a shame, because background images add some possibilities that are very difficult to reproduce with clas...

Ninject kernel.Get

ninject resolve

Im using Ninject 3.0, in version 2.0 the following code worked:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.