|
|
|
@@ -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) |
|
|
|
|