课程学习学员邮箱处理

This commit is contained in:
xxq250 2023-03-09 09:20:52 +08:00
parent 57c54da025
commit e1171a96c4
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ namespace :import_educoder_cource_repo do
user = User.find_by(phone: row.myshixun_user_phone) || User.find_by(mail: row.myshixun_user_mail)
unless user.present?
username = generate_user_login('p')
email = row.myshixun_user_mail
email = row.myshixun_user_mail.blank? ? "#{username}@gitlink.org.cn" : row.myshixun_user_mail
phone = row.myshixun_user_phone
password = "a12345678"
user = User.new(nickname: row.myshixun_user_name, login: username, mail: email, password: password, type: 'User', phone: phone)