mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Remove outdated warning
We only create a user when seeding the database and we check that there's no user already. We don't have a use case for adding an admin user to a database with user data. It also referred to a spree task that doesn't exist in our code base.
This commit is contained in:
@@ -3,18 +3,6 @@
|
||||
def create_admin_user
|
||||
attributes = read_user_attributes
|
||||
|
||||
if Spree::User.find_by(email: attributes[:email])
|
||||
printf <<~TEXT
|
||||
|
||||
WARNING: 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.
|
||||
|
||||
TEXT
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
admin = Spree::User.new(attributes)
|
||||
admin.skip_confirmation!
|
||||
admin.skip_confirmation_notification!
|
||||
@@ -49,4 +37,4 @@ def read_user_attributes
|
||||
}
|
||||
end
|
||||
|
||||
create_admin_user if Spree::User.admin.empty?
|
||||
create_admin_user if Spree::User.none?
|
||||
|
||||
Reference in New Issue
Block a user