How to configure the program to make a user login after registration even without confirming email by email?

I use devise (2.0.4) to configure custom login and login functions. Now I want the user to be able to log in after registration. The event will send a confirmation email. Just check "This user is not verified." How to setup?

+3
source share
2 answers

I found this to solve the problem as well. Which one to choose?

def active_for_authentication?
  true
end
+3
source

Try adding the overridden method confirmation_required?directly to your user model:

class User < ActiveRecord::Base
  ...

  def confirmation_required?
    false
  end
end
+1
source

All Articles