ecloud_sso
daiao 5 years ago
parent 49277a9f29
commit 2ca9f0e719

@ -157,8 +157,8 @@ namespace :tfxy do
2.upto(student_data_last_row) do |r|
# 邮箱存在
if student_data.cell(r, 9)&.strip.present?
old_user = User.where("phone = '#{student_data.cell(r, 8)}' OR mail = '#{student_data.cell(r, 9).strip}' OR login = 'tfxy#{student_data.cell(r, 1)}' " ).first
if student_data.cell(r, 9).to_s&.strip.present?
old_user = User.where("phone = '#{student_data.cell(r, 8)}' OR mail = '#{student_data.cell(r, 9).to_s.strip}' OR login = 'tfxy#{student_data.cell(r, 1)}' " ).first
else
old_user = User.where("phone = '#{student_data.cell(r, 8)}' OR login = 'tfxy#{student_data.cell(r, 1)}' " ).first
end
@ -172,7 +172,7 @@ namespace :tfxy do
lastname: student_data.cell(r, 2),
nickname: student_data.cell(r, 2),
password: "Edu#{student_data.cell(r, 1)}",
mail: student_data.cell(r, 9)&.strip.present? ? student_data.cell(r, 9)&.strip : nil,
mail: student_data.cell(r, 9).to_s&.strip.present? ? student_data.cell(r, 9).to_s&.strip : nil,
profile_completed: true,
professional_certification: 1,
certification: 1,

Loading…
Cancel
Save