From ef3422bf58095ba068eb1f375f2caa240bc728fd Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Mon, 15 May 2023 16:18:45 +1000 Subject: [PATCH] Update syntax and clarify use of outdated gem --- app/models/spree/user.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/spree/user.rb b/app/models/spree/user.rb index a923f23e5c..c11de4b4b9 100644 --- a/app/models/spree/user.rb +++ b/app/models/spree/user.rb @@ -51,7 +51,10 @@ module Spree validates :email, 'valid_email_2/email': { mx: true }, if: :email_changed? validate :limit_owned_enterprises validates :uid, uniqueness: true, if: lambda { uid.present? } - validates_email :uid, if: lambda { uid.present? } + + # Same validation as in the openid_connect gem. + # This validator is totally outdated but we indirectly depend on it. + validates :uid, email: true, if: lambda { uid.present? } class DestroyWithOrdersError < StandardError; end