Have Admin add users, not the Devise Sign Up form

I have Devise working. I have roles for users working. I even added custom fields to the User model and it seems that now everything is working fine. So people can now subscribe using the Sign Up form provided by Devise.

But now I need Admins, to add users. Of course, I can't use the Sign Up form for that. If I just use a regular User model, their passwords are blank. Or maybe the form won't even work because it will try to use the Registration Controller instead of the User controller (been there, done that), so it won't work.

This is the general idea of what I'm looking for. This is my objective.

Wouldn't be easier to just create the authentication from scratch? Any thoughts from anybody that has been through that?

It depends. Devise is a well-tested and powerful authentication solution. You need to decide if it's overkill or not for what you are trying to achieve. Regarding invitations, do you know: https://github.com/scambra/devise_invitable ? looks like it does what you want..

I think I've done something simple like this to arbitrarily create a user with Devise:

class User < ActiveRecord::Base   def self.create_new_user(email, password)     user = User.new({ :email => email, :password => password })     return user.save   end end

That does require the admin to choose a password. I have an algorithm to create a random 10-character string that I mail to the user with the invite. The user can change that if they want.