mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Adjust user creation syntax
#skip_confirmation! can't be chained...
This commit is contained in:
@@ -56,7 +56,8 @@ 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!.skip_confirmation_notification!
|
||||
admin.skip_confirmation!
|
||||
admin.skip_confirmation_notification!
|
||||
if admin.save
|
||||
role = Spree::Role.find_or_create_by_name 'admin'
|
||||
admin.spree_roles << role
|
||||
|
||||
Reference in New Issue
Block a user