mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Skip confirmation when creating first admin user
This commit is contained in:
@@ -56,6 +56,7 @@ def create_admin_user
|
||||
say "\nWARNING: There is already a user with the email: #{email}, so no account changes were made. If you wish to create an additional admin user, please run rake spree_auth:admin:create again with a different email.\n\n"
|
||||
else
|
||||
admin = Spree::User.new(attributes)
|
||||
admin.skip_confirmation!
|
||||
if admin.save
|
||||
role = Spree::Role.find_or_create_by_name 'admin'
|
||||
admin.spree_roles << role
|
||||
|
||||
@@ -51,7 +51,4 @@ end
|
||||
# Create users:
|
||||
require File.join(File.dirname(__FILE__), 'default', 'users')
|
||||
|
||||
spree_user = Spree::User.first
|
||||
spree_user && spree_user.confirm!
|
||||
|
||||
DefaultStockLocation.find_or_create
|
||||
|
||||
Reference in New Issue
Block a user