mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
Merge pull request #11321 from mkllnk/dev-user-valid
Skip online domain validation of dev user email
This commit is contained in:
@@ -58,10 +58,13 @@ def create_admin_user
|
||||
admin = Spree::User.new(attributes)
|
||||
admin.skip_confirmation!
|
||||
admin.skip_confirmation_notification!
|
||||
|
||||
# The default domain example.com is not resolved by all nameservers.
|
||||
ValidEmail2::Address.define_method(:valid_mx?) { true }
|
||||
|
||||
if admin.save
|
||||
role = Spree::Role.find_or_create_by(name: 'admin')
|
||||
admin.spree_roles << role
|
||||
admin.save
|
||||
say "New admin user persisted!"
|
||||
else
|
||||
say "There was some problems with persisting new admin user:"
|
||||
|
||||
Reference in New Issue
Block a user