Follow up 0b449839ea
- Fixes #3956 - Migration of the MS365 account fails by upper and lower case differences in email address.
This commit is contained in:
parent
aa4ade336e
commit
3835bd3fdb
2 changed files with 2 additions and 4 deletions
|
@ -85,10 +85,9 @@ class ExternalCredential::Google
|
|||
|
||||
migrate_channel = nil
|
||||
Channel.where(area: 'Email::Account').find_each do |channel|
|
||||
next if channel.options.dig(:inbound, :options, :user)&.downcase != user_data[:email].downcase
|
||||
next if channel.options.dig(:inbound, :options, :host)&.downcase != 'imap.gmail.com'
|
||||
next if channel.options.dig(:outbound, :options, :user)&.downcase != user_data[:email].downcase
|
||||
next if channel.options.dig(:outbound, :options, :host)&.downcase != 'smtp.gmail.com'
|
||||
next if channel.options.dig(:outbound, :options, :user)&.downcase != user_data[:email].downcase && channel.options.dig(:outbound, :email)&.downcase != user_data[:email].downcase
|
||||
|
||||
migrate_channel = channel
|
||||
|
||||
|
|
|
@ -89,10 +89,9 @@ class ExternalCredential::Microsoft365
|
|||
|
||||
migrate_channel = nil
|
||||
Channel.where(area: 'Email::Account').find_each do |channel|
|
||||
next if channel.options.dig(:inbound, :options, :user)&.downcase != user_data[:email].downcase
|
||||
next if channel.options.dig(:inbound, :options, :host)&.downcase != 'outlook.office365.com'
|
||||
next if channel.options.dig(:outbound, :options, :user)&.downcase != user_data[:email].downcase
|
||||
next if channel.options.dig(:outbound, :options, :host)&.downcase != 'smtp.office365.com'
|
||||
next if channel.options.dig(:outbound, :options, :user)&.downcase != user_data[:email].downcase && channel.options.dig(:outbound, :email)&.downcase != user_data[:email].downcase
|
||||
|
||||
migrate_channel = channel
|
||||
|
||||
|
|
Loading…
Reference in a new issue