fix sync for email with @yahoo.com.tw

This commit is contained in:
chiu 2024-01-20 01:49:14 +00:00
parent 17b385d427
commit 63158ad9b3
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ module AsiaSyncPlugin
#待確認: 指導論文(可用個人研究製作) paper_data
def self.user_id(member)
user_id = member.email.sub(/@asia\.edu\.tw$/, '')
user_id_match = member.email.match(/(.*)@asia\.edu\.tw/)
user_id = user_id_match ? user_id_match[1] : nil
end
def self.localize_data(data)
in_use_locales = Site.first.in_use_locales rescue [:en,:zh_tw]