Class: SpreeCmCommissioner::ExistingAccountChecker
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::ExistingAccountChecker
- Includes:
- Interactor
- Defined in:
- app/interactors/spree_cm_commissioner/existing_account_checker.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
5 6 7 8 9 |
# File 'app/interactors/spree_cm_commissioner/existing_account_checker.rb', line 5 def call user = Spree.user_class.find_user_by_login(context.login, context.tenant_id) if context.login.present? context.fail!(message: I18n.t('account_checker.verify.already_exist', login: context.login)) if user.present? end |