导入用户问题

dev_aliyun
daiao 5 years ago
parent 4db4970c1f
commit 974dad2a5d

@ -3034,7 +3034,7 @@ end
department = school.departments.where(:name => list[2]).first department = school.departments.where(:name => list[2]).first
user_params = {status: 1, login: prefix + list[0].to_s.strip, lastname: list[1].to_s.strip, user_params = {status: 1, login: prefix + list[0].to_s.strip, lastname: list[1].to_s.strip,
nickname: list[1].to_s.strip, professional_certification: 1, certification: 1, grade: 0, nickname: list[1].to_s.strip, professional_certification: 1, certification: 1, grade: 0,
password: "12345678", phone: list[5].blank? ? nil : list[5], mail: "#{list[0].to_s.strip}@qq.com", profile_completed: 1} password: "12345678", phone: list[5].blank? ? nil : list[5], mail: "#{prefix+list[0].to_s.strip}@qq.com", profile_completed: 1}
user = User.create(user_params) user = User.create(user_params)
user = User.find(prefix + list[0].to_s.strip) user = User.find(prefix + list[0].to_s.strip)
if user if user

Loading…
Cancel
Save