Class: SpreeCmCommissioner::ExistingAccountChecker

Inherits:
Object
  • Object
show all
Includes:
Interactor
Defined in:
app/interactors/spree_cm_commissioner/existing_account_checker.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
# File 'app/interactors/spree_cm_commissioner/existing_account_checker.rb', line 5

def call
  user = Spree.user_class.(context., context.tenant_id) if context..present?

  context.fail!(message: I18n.t('account_checker.verify.already_exist', login: context.)) if user.present?
end